ruby-changes:18672
From: usa <ko1@a...>
Date: Fri, 28 Jan 2011 12:04:11 +0900 (JST)
Subject: [ruby-changes:18672] Ruby:r30697 (trunk): * test/ruby/test_process.rb (TestProcess#test_too_long_path{,2}):
usa 2011-01-28 11:48:46 +0900 (Fri, 28 Jan 2011) New Revision: 30697 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30697 Log: * test/ruby/test_process.rb (TestProcess#test_too_long_path{,2}): should handle Errno::E2BIG, because this test checks crash of ruby, not the error type system. Modified files: trunk/ChangeLog trunk/test/ruby/test_process.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30696) +++ ChangeLog (revision 30697) @@ -1,3 +1,9 @@ +Fri Jan 28 11:47:00 2011 NAKAMURA Usaku <usa@r...> + + * test/ruby/test_process.rb (TestProcess#test_too_long_path{,2}): + should handle Errno::E2BIG, because this test checks crash of ruby, + not the error type system. + Fri Jan 28 11:23:54 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT(). Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 30696) +++ test/ruby/test_process.rb (revision 30697) @@ -1234,11 +1234,15 @@ def test_too_long_path bug4314 = '[ruby-core:34842]' - assert_raise(Errno::ENOENT, bug4314) {Process.spawn("a" * 10_000_000)} + exs = [Errno::ENOENT] + exs << Errno::E2BIG if defined?(Errno::E2BIG) + assert_raise(*exs, bug4314) {Process.spawn("a" * 10_000_000)} end def test_too_long_path2 bug4315 = '[ruby-core:34833]' - assert_raise(Errno::ENOENT, bug4315) {Process.spawn('"a"|'*10_000_000)} + exs = [Errno::ENOENT] + exs << Errno::E2BIG if defined?(Errno::E2BIG) + assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)} end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/