From 45ea81a4920f1bd99e253b059c665731a3d967d5 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 28 Oct 2008 12:03:14 +0000 Subject: * test/ruby/test_require.rb (test_require_too_long_filename): too long commandline may be rejected by OS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_require.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index a5f453a055..4048ba038d 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 -- cgit v1.2.3