summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index e487927ebe..f2a9a666ff 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1255,6 +1255,8 @@ class TestIO < Test::Unit::TestCase
end
def test_nofollow
+ # O_NOFOLLOW is not standard.
+ return if /freebsd|linux/ !~ RUBY_PLATFORM
return unless defined? File::NOFOLLOW
mkcdtmpdir {
open("file", "w") {|f| f << "content" }
@@ -1263,10 +1265,10 @@ class TestIO < Test::Unit::TestCase
rescue NotImplementedError
return
end
- assert_raise(Errno::ELOOP) {
+ assert_raise(Errno::EMLINK, Errno::ELOOP) {
open("slnk", File::RDONLY|File::NOFOLLOW) {}
}
- assert_raise(Errno::ELOOP) {
+ assert_raise(Errno::EMLINK, Errno::ELOOP) {
File.foreach("slnk", :open_args=>[File::RDONLY|File::NOFOLLOW]) {}
}
}