diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-11-16 09:14:17 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-16 09:14:17 +0900 |
| commit | aaac528b8027667ea83b2501c8d4c65edb670c4d (patch) | |
| tree | cf0b0dd5a0b50fc69a8667c8b6b723e65ff54bb4 | |
| parent | a0dc4abe987edc3ef52b0dc89c50e5e13b3cdbe3 (diff) | |
| parent | 181716a16cfd088108463b5f9130af75a5993a93 (diff) | |
| download | rust-aaac528b8027667ea83b2501c8d4c65edb670c4d.tar.gz rust-aaac528b8027667ea83b2501c8d4c65edb670c4d.zip | |
Rollup merge of #90790 - tamaroning:fix-lib-std-test, r=Mark-Simulacrum
Fix standard library test with read_link closes #90669 resolve this issue by comparing between Paths instead of strs
| -rw-r--r-- | library/std/src/fs/tests.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 628de13156c..1417d860c47 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -833,20 +833,11 @@ fn symlink_noexist() { fn read_link() { if cfg!(windows) { // directory symlink - assert_eq!( - check!(fs::read_link(r"C:\Users\All Users")).to_str().unwrap(), - r"C:\ProgramData" - ); + assert_eq!(check!(fs::read_link(r"C:\Users\All Users")), Path::new(r"C:\ProgramData")); // junction - assert_eq!( - check!(fs::read_link(r"C:\Users\Default User")).to_str().unwrap(), - r"C:\Users\Default" - ); + assert_eq!(check!(fs::read_link(r"C:\Users\Default User")), Path::new(r"C:\Users\Default")); // junction with special permissions - assert_eq!( - check!(fs::read_link(r"C:\Documents and Settings\")).to_str().unwrap(), - r"C:\Users" - ); + assert_eq!(check!(fs::read_link(r"C:\Documents and Settings\")), Path::new(r"C:\Users")); } let tmpdir = tmpdir(); let link = tmpdir.join("link"); |
