Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test_symlink #771

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib_eio_windows/test/test_fs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ let test_symlink env () =
Unix.mkdir "another" 0o700;
print_endline @@ Unix.realpath "to-subdir" |}
*)
if not (Unix.has_symlink ()) then
Printf.printf "Skipping test_symlink on systems that don't support symlinks.\n"
else
let cwd = Eio.Stdenv.cwd env in
try_mkdir (cwd / "sandbox");
Unix.symlink ~to_dir:true ".." "sandbox\\to-root";
Expand Down Expand Up @@ -277,4 +280,5 @@ let tests env = [
"unlink", `Quick, test_unlink env;
"failing-unlink", `Quick, try_failing_unlink env;
"rmdir", `Quick, test_remove_dir env;
"mkdirs", `Quick, test_mkdirs env;
]
Loading