Skip to content

Commit

Permalink
Rollup merge of #119642 - petrochenkov:winstdtest, r=ChrisDenton
Browse files Browse the repository at this point in the history
library: Fix a symlink test failing on Windows
  • Loading branch information
compiler-errors committed Jan 6, 2024
2 parents a98993c + 0d70e58 commit 71610e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/std/src/fs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,10 @@ fn read_link() {
}
// Check that readlink works with non-drive paths on Windows.
let link = tmpdir.join("link_unc");
check!(symlink_dir(r"\\localhost\c$\", &link));
assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\"));
if got_symlink_permission(&tmpdir) {
check!(symlink_dir(r"\\localhost\c$\", &link));
assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\"));
};
}
let link = tmpdir.join("link");
if !got_symlink_permission(&tmpdir) {
Expand Down

0 comments on commit 71610e2

Please sign in to comment.