test_gc.rb: check signal first
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): check the signal terminated the process before messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
51dcb02c69
commit
f23a72a656
@ -349,10 +349,14 @@ class TestGc < Test::Unit::TestCase
|
||||
ObjectSpace.define_finalizer(Object.new, f)
|
||||
end
|
||||
end;
|
||||
status = assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595)
|
||||
unless /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_equal("INT", Signal.signame(status.termsig))
|
||||
out, err, status = assert_in_out_err(["-e", src], "", [], [], bug10595) do |*result|
|
||||
break result
|
||||
end
|
||||
unless /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_equal("INT", Signal.signame(status.termsig), bug10595)
|
||||
end
|
||||
assert_match(/Interrupt/, err.first, proc {err.join("\n")})
|
||||
assert_empty(out)
|
||||
end
|
||||
|
||||
def test_verify_internal_consistency
|
||||
|
Loading…
x
Reference in New Issue
Block a user