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:
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user