about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-24 19:21:48 -0500
committerGitHub <noreply@github.com>2025-02-24 19:21:48 -0500
commit74e5366020d693d97bfc266bad8503117f025a1d (patch)
treee899c0193c0e60858c87bedefa997bdb4a0151bc /library/std/src
parent296faa87a8ad03144f239db55320ce0aa0039295 (diff)
parent9c65672397bab45d2802d994b493353d09cd1535 (diff)
downloadrust-74e5366020d693d97bfc266bad8503117f025a1d.tar.gz
rust-74e5366020d693d97bfc266bad8503117f025a1d.zip
Rollup merge of #137543 - petrochenkov:wintest, r=ChrisDenton
std: Fix another new symlink test on Windows

Checking for `got_symlink_permission` first is a standard procedure for such tests.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/fs/tests.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs
index c7833c7dc71..38dcd816d26 100644
--- a/library/std/src/fs/tests.rs
+++ b/library/std/src/fs/tests.rs
@@ -1962,6 +1962,10 @@ fn test_rename_directory_to_non_empty_directory() {
 #[test]
 fn test_rename_symlink() {
     let tmpdir = tmpdir();
+    if !got_symlink_permission(&tmpdir) {
+        return;
+    };
+
     let original = tmpdir.join("original");
     let dest = tmpdir.join("dest");
     let not_exist = Path::new("does not exist");