diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-09 13:43:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-09 13:43:44 +0000 |
commit | 9cc49519474039c651b801fae365db378f6178a9 (patch) | |
tree | 26ebf2ede8f450a75b1ac349a420f63ed3cf6e1f /test | |
parent | d4348e081a53d46fa286fc24009fa729587e71d5 (diff) | |
download | ruby-9cc49519474039c651b801fae365db378f6178a9.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.rb | 8 |
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 |