summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_file_exhaustive.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 8070d57..6611b92 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -557,6 +557,15 @@ class TestFileExhaustive < Test::Unit::TestCase
end;
end
+ if NTFS
+ def test_readlink_junction
+ base = File.basename(nofile)
+ err = IO.popen(%W"cmd.exe /c mklink /j #{base} .", chdir: @dir, err: %i[child out], &:read)
+ skip err unless $?.success?
+ assert_equal(@dir, File.readlink(nofile))
+ end
+ end
+
def test_unlink
assert_equal(1, File.unlink(regular_file))
make_file("foo", regular_file)