fix(linux-agent): 修正坐标换算单测期望值 + 冒烟脚本纳入单测

- scale(32768,1920) 期望值应为 959(32768×1919÷65535=959.49 向下取整),
  原写成 960 —— 是**测试期望值错**,实现本身正确(0→0、65535→extents-1 均通过);
  集成测试因带 ±2 像素容差未能暴露,是跑单测才抓到的
- scripts/linux-smoke.sh 原先只跑 --test smoke,漏掉 --bins 单测;现两层都跑
- 手册 §8.4 说明补充单测这一层及其必要性

验证:bash scripts/linux-smoke.sh → 单测 4 passed + 端到端 2 passed
This commit is contained in:
yu committed 2026-10-23 15:04:56 +08:00
1 parent 49f85db9f9
commit bae871c78c
3 files changed
+16 -5

No files matched your search

+4 -1
View File
@@ -43,6 +43,9 @@ if [ "$ready" -ne 1 ]; then
fi
echo "[smoke] X server 就绪:$(xdpyinfo -display "$DISPLAY_NUM" | grep -E 'dimensions' | head -1)"
# 两个测试共用同一块虚拟屏与指针,必须串行
# 先跑纯逻辑单测(键码映射 / 坐标换算),不需要 X server
cargo test -p linux-agent --bins
# 再跑端到端用例:两个用例共用同一块虚拟屏与指针,必须串行
cargo test -p linux-agent --test smoke -- --nocapture --test-threads=1
echo "[smoke] 通过"