Fix Windows path assertions in the launcher toolchain test (#3285)

Compare managed compiler and PATH entries as platform paths, including Windows executable suffixes. Fixes the Windows assertion that blocked the native-capable launcher release.

Validation: pr_ready passed (401 Python and 219 launcher tests), and the release dry run passed tests and packaged smoke checks on Linux, macOS and Windows.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
levzzz
2026-10-28 21:42:53 +05:00
committed by GitHub
parent a5fcb49900
commit 9755416a02
+8 -8
View File
@@ -394,14 +394,14 @@ mod tests {
let get = |name: &str| env.iter().find(|(k, _)| k == name).map(|(_, v)| v.clone());
assert_eq!(get("RUSTUP_TOOLCHAIN"), Some(None));
assert_eq!(get("RUSTC_WRAPPER"), Some(None));
assert!(get("RUSTC")
.flatten()
.unwrap()
.starts_with("/rust/1.99.1-x/bin/rustc"));
assert!(get("PATH")
.flatten()
.unwrap()
.starts_with("/rust/1.99.1-x/bin"));
assert_eq!(
PathBuf::from(get("RUSTC").flatten().unwrap()),
toolchain.dir.join("bin").join(exe("rustc"))
);
assert_eq!(
std::env::split_paths(&get("PATH").flatten().unwrap()).next(),
Some(toolchain.dir.join("bin"))
);
assert!(get("CARGO_HOME").flatten().unwrap().ends_with("cargo"));
}
}