зеркало из https://github.com/github/ruby.git
Run GC.start before test_too_long_path.
NoMemoryError is raised in MiniTest#exception_details where exception is made, and no effect. Run GC.start before running to keep the room. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
6199181b09
Коммит
cf8626a082
|
@ -1236,15 +1236,17 @@ class TestProcess < Test::Unit::TestCase
|
|||
end if File.executable?("/bin/sh")
|
||||
|
||||
def test_too_long_path
|
||||
GC.start
|
||||
bug4314 = '[ruby-core:34842]'
|
||||
exs = [NoMemoryError, Errno::ENOENT]
|
||||
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
|
||||
GC.start
|
||||
bug4315 = '[ruby-core:34833]'
|
||||
exs = [NoMemoryError, Errno::ENOENT]
|
||||
exs = [Errno::ENOENT]
|
||||
exs << Errno::E2BIG if defined?(Errno::E2BIG)
|
||||
assert_raise(*exs, bug4315) {Process.spawn('"a"|'*10_000_000)}
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче