aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-09 13:43:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-09 13:43:44 +0000
commitf23a72a656f3f8cb108068824dc7208258f632aa (patch)
tree26ebf2ede8f450a75b1ac349a420f63ed3cf6e1f /test
parent51dcb02c697bfc509edb0f01c4db8249e4ab3693 (diff)
downloadruby-f23a72a656f3f8cb108068824dc7208258f632aa.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_gc.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index d0a4826936..44adb27f00 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -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)
+ 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))
+ 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