Skip to content

Commit 3ba588d

Browse files
committed
make fs.rs at least build under Windows
1 parent c4e29c8 commit 3ba588d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/run-pass/fs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ fn test_symlink() {
142142
let symlink_path = prepare("miri_test_fs_symlink.txt");
143143

144144
// Creating a symbolic link should succeed.
145+
#[cfg(unix)]
145146
std::os::unix::fs::symlink(&path, &symlink_path).unwrap();
147+
#[cfg(windows)]
148+
std::os::windows::fs::symlink_file(&path, &symlink_path).unwrap();
146149
// Test that the symbolic link has the same contents as the file.
147150
let mut symlink_file = File::open(&symlink_path).unwrap();
148151
let mut contents = Vec::new();

0 commit comments

Comments
 (0)