mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Catch NoMemoryError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dcea3a0fb2
commit
6199181b09
1 changed files with 2 additions and 2 deletions
|
@ -1237,14 +1237,14 @@ class TestProcess < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_too_long_path
|
def test_too_long_path
|
||||||
bug4314 = '[ruby-core:34842]'
|
bug4314 = '[ruby-core:34842]'
|
||||||
exs = [Errno::ENOENT]
|
exs = [NoMemoryError, Errno::ENOENT]
|
||||||
exs << Errno::E2BIG if defined?(Errno::E2BIG)
|
exs << Errno::E2BIG if defined?(Errno::E2BIG)
|
||||||
assert_raise(*exs, bug4314) {Process.spawn("a" * 10_000_000)}
|
assert_raise(*exs, bug4314) {Process.spawn("a" * 10_000_000)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_too_long_path2
|
def test_too_long_path2
|
||||||
bug4315 = '[ruby-core:34833]'
|
bug4315 = '[ruby-core:34833]'
|
||||||
exs = [Errno::ENOENT]
|
exs = [NoMemoryError, Errno::ENOENT]
|
||||||
exs << Errno::E2BIG if defined?(Errno::E2BIG)
|
exs << Errno::E2BIG if defined?(Errno::E2BIG)
|
||||||
assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)}
|
assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue