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

2
Cargo.lock generated
View File

@ -4,7 +4,7 @@ version = 3
[[package]]
name = "addr2line"
version = "0.24.2"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
dependencies = [

View File

@ -129,7 +129,7 @@ proc-macro-error = { version = "1.0", default-features = false }
proc-macro2 = "1.0"
procfs = "0.16.0"
pwd = "1.3"
quick-xml = "0.37.0"
quick-xml = "0.32.0"
quickcheck = "1.0"
quickcheck_macros = "1.0"
quote = "1.0"

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);
}
}