ruby-changes:39432
From: nobu <ko1@a...>
Date: Sun, 9 Aug 2015 22:44:00 +0900 (JST)
Subject: [ruby-changes:39432] nobu:r51513 (trunk): test_gc.rb: check signal first
nobu 2015-08-09 22:43:44 +0900 (Sun, 09 Aug 2015) New Revision: 51513 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51513 Log: test_gc.rb: check signal first * test/ruby/test_gc.rb (test_interrupt_in_finalizer): check the signal terminated the process before messages. Modified files: trunk/test/ruby/test_gc.rb Index: test/ruby/test_gc.rb =================================================================== --- test/ruby/test_gc.rb (revision 51512) +++ test/ruby/test_gc.rb (revision 51513) @@ -349,10 +349,14 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L349 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/