mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4afa5fead8
commit
d4f8142d18
2 changed files with 12 additions and 2 deletions
|
@ -1234,11 +1234,15 @@ class TestProcess < Test::Unit::TestCase
|
|||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue