Test case platform result verify, revoke Cargo.lock Cargo.toml

This commit is contained in:
Zhenping Zhao
2024-11-19 15:35:48 -08:00
parent 8ce83719d5
commit 4832bc733e
3 changed files with 8 additions and 2 deletions

View File

@ -341,7 +341,10 @@ pub mod pwd_per_drive_singleton {
// Expand a relative path
let expanded = expand_pwd_per_drive(Path::new("C:test"));
#[cfg(target_os = "windows")]
assert_eq!(expanded, Some(PathBuf::from("C:\\Users\\Home\\test")));
#[cfg(not(target_os = "windows"))]
assert_eq!(expanded, None);
// Will NOT expand an absolute path
let expanded = expand_pwd_per_drive(Path::new("C:\\absolute\\path"));
@ -353,6 +356,9 @@ pub mod pwd_per_drive_singleton {
// Expand with no PWD set for the drive
let expanded = expand_pwd_per_drive(Path::new("D:test"));
#[cfg(target_os = "windows")]
assert_eq!(expanded, Some(PathBuf::from("D:\\test")));
#[cfg(not(target_os = "windows"))]
assert_eq!(expanded, None);
}
}