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

ruby-changes:8466

From: usa <ko1@a...>
Date: Tue, 28 Oct 2008 21:03:25 +0900 (JST)
Subject: [ruby-changes:8466] Ruby:r19998 (trunk): * test/ruby/test_require.rb (test_require_too_long_filename): too long

usa	2008-10-28 21:03:14 +0900 (Tue, 28 Oct 2008)

  New Revision: 19998

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

  Log:
    * test/ruby/test_require.rb (test_require_too_long_filename): too long
      commandline may be rejected by OS.

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

Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 19997)
+++ test/ruby/test_require.rb	(revision 19998)
@@ -27,11 +27,15 @@
       end
     INPUT
 
-    assert_in_out_err(["-S", "foo/" * 10000 + "foo"], "") do |r, e|
-      assert_equal([], r)
-      assert_operator(2, :<=, e.size)
-      assert_equal("openpath: pathname too long (ignored)", e.first)
-      assert_match(/\(LoadError\)/, e.last)
+    begin
+      assert_in_out_err(["-S", "foo/" * 10000 + "foo"], "") do |r, e|
+        assert_equal([], r)
+        assert_operator(2, :<=, e.size)
+        assert_equal("openpath: pathname too long (ignored)", e.first)
+        assert_match(/\(LoadError\)/, e.last)
+      end
+    rescue Errno::EINVAL
+      # too long commandline may be blocked by OS.
     end
   end
 

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

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