From cddb104ba1becc92fa195cbea9b9d19fe737280b 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: http://svn.ruby-lang.org/repos/ruby/trunk@19998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_require.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test/ruby') 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 -- cgit