[前][次][番号順一覧][スレッド一覧]

ruby-changes:7231

From: akr <ko1@a...>
Date: Thu, 21 Aug 2008 19:04:37 +0900 (JST)
Subject: [ruby-changes:7231] Ruby:r18750 (trunk): test O_NOFOLLOW only on FreeBSD and Linux.

akr	2008-08-21 19:04:23 +0900 (Thu, 21 Aug 2008)

  New Revision: 18750

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18750

  Log:
    test O_NOFOLLOW only on FreeBSD and Linux.

  Modified files:
    trunk/test/ruby/test_io.rb

Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 18749)
+++ test/ruby/test_io.rb	(revision 18750)
@@ -1255,6 +1255,8 @@
   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 @@
       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]) {}
       }
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]