From 375cc4f1fa780ba85b970d18c17dcd8643dc007c Mon Sep 17 00:00:00 2001 From: AskaEth Date: Fri, 13 Nov 2026 00:31:14 +0800 Subject: [PATCH] =?UTF-8?q?test(presenter):=20junction=20=E5=A4=B9?= =?UTF-8?q?=E5=85=B7=E6=94=B9=E6=88=90=E9=80=90=E6=AE=B5=20join=EF=BC=88?= =?UTF-8?q?=E5=B8=A6=E6=AD=A3=E6=96=9C=E6=9D=A0=E7=9A=84=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E8=AE=A9=20mklink=20=E6=8A=A5=E6=97=A0=E6=95=88=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E7=94=A8=E4=BE=8B=E4=B8=80=E7=9B=B4=E9=9D=99?= =?UTF-8?q?=E9=BB=98=E8=B7=B3=E8=BF=87=EF=BC=89=EF=BC=8C=E5=AE=88=E5=8D=AB?= =?UTF-8?q?=E8=A1=A5=E8=AE=B0=20M291=20=E5=8F=98=E5=BC=82=EF=BC=88M291?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/core/tests/child_quiet_guard.rs | 6 ++++++ crates/presenter/src/host/game/roots.rs | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/core/tests/child_quiet_guard.rs b/crates/core/tests/child_quiet_guard.rs index 3f994be..89ca7f7 100644 --- a/crates/core/tests/child_quiet_guard.rs +++ b/crates/core/tests/child_quiet_guard.rs @@ -35,6 +35,12 @@ //! `app-iced/src/platform/locale.rs` 的 `quiet(program)` 改回裸构造 ⇒ 红(用户报的那处 //! `reg.exe`);⑦`export.rs` 三个 opener 留裸 + 清单写明理由 ⇒ **不**红。 //! +//! M291(`presenter` 的 junction 夹具):⑧`host/game/roots.rs` 的 `make_dir_link` 改回裸 +//! `Command::new("cmd")` ⇒ 红并点名 `crates/presenter/src/host/game/roots.rs:146`。这一条同时钉 +//! 一处**收并**:改之前本守卫一次抓到两处(`mklink /J` 的产品副本 `roots.rs:193` 与测试副本 +//! `tests_multiroot.rs:83`),M291 把两份收成一个共享夹具(`roots::make_dir_link`,`#[cfg(test)]`), +//! 所以现在的变异只可能剩一处。 +//! //! ## P1-1:守卫自己被变异验了两遍才对的 //! //! ③第一次**没红**:断言搜整份源码,而 `quiet` 的文档注释里就写着 diff --git a/crates/presenter/src/host/game/roots.rs b/crates/presenter/src/host/game/roots.rs index 6bad2a9..0a0b6d3 100644 --- a/crates/presenter/src/host/game/roots.rs +++ b/crates/presenter/src/host/game/roots.rs @@ -194,7 +194,9 @@ mod tests { #[test] fn junction_to_the_same_folder_is_one_root() { let root = temp_root("ull-roots-junction"); - let target = root.join("official/.minecraft"); + // 逐段 `join`:`join("official/.minecraft")` 会留下正斜杠,而 `cmd` 把 `/` 当开关前缀, + // `mklink` 于是报「无效语法」⇒ 这条用例一直走的是下面的「跳过」分支(M291 实测)。 + let target = root.join("official").join(".minecraft"); std::fs::create_dir_all(target.join("versions")).expect("建目录"); let link = root.join("linked"); if !make_dir_link(&link, &target) {