diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-21 10:04:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-21 10:04:23 +0000 |
commit | 3f7bed0b805fbb4cd9c88d59a1516eacd22170e5 (patch) | |
tree | b0b01d1054db2e53462038aa777e1c2ec371f591 /test/ruby/test_io.rb | |
parent | a0e3fe5d7cf067bbca1cba92f471e98e6527d138 (diff) | |
download | ruby-3f7bed0b805fbb4cd9c88d59a1516eacd22170e5.tar.gz |
test O_NOFOLLOW only on FreeBSD and Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 6 |
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]) {} } } |