summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-28 12:03:14 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-28 12:03:14 +0000
commitcddb104ba1becc92fa195cbea9b9d19fe737280b (patch)
treee8e298f2c991b4804d0daecb6c9909560ff18264 /test/ruby
parentaf48419af6d68ab47492e6e40718f9a5714e92be (diff)
downloadruby-cddb104ba1becc92fa195cbea9b9d19fe737280b.tar.gz
ruby-cddb104ba1becc92fa195cbea9b9d19fe737280b.tar.xz
ruby-cddb104ba1becc92fa195cbea9b9d19fe737280b.zip
* test/ruby/test_require.rb (test_require_too_long_filename): too long
commandline may be rejected by OS. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_require.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index a5f453a05..4048ba038 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -27,11 +27,15 @@ class TestRequire < Test::Unit::TestCase
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