summaryrefslogtreecommitdiff
path: root/test/testunit/test_sorting.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-19 07:47:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-19 07:47:26 +0000
commit689333a0ba8b727836281b9e4c434413de8cae7b (patch)
tree981f2c91727ba75bbe5025d54edde4ee36894804 /test/testunit/test_sorting.rb
parentc704bb3149dab22bb41f0c5061a0b5df7f525aa3 (diff)
test/testunit: reap zombie
* test/testunit/test_hideskip.rb (test_hideskip): reap zombie by reading with IO.popen instead of separated spawn and assert. * test/testunit/test_redefinition.rb (test_redefinition): ditto. * test/testunit/test_sorting.rb (test_sorting): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit/test_sorting.rb')
-rw-r--r--test/testunit/test_sorting.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testunit/test_sorting.rb b/test/testunit/test_sorting.rb
index 77374f6843..96348dd172 100644
--- a/test/testunit/test_sorting.rb
+++ b/test/testunit/test_sorting.rb
@@ -2,16 +2,16 @@ require 'test/unit'
class TestTestUnitSorting < Test::Unit::TestCase
def test_sorting
- test_out, o = IO.pipe
- spawn(*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_sorting.rb",
- "--verbose", out: o, err: o)
- o.close
- result = test_out.read
-
+ result = sorting
assert_match(/^ 1\) Skipped:/, result)
assert_match(/^ 2\) Failure:/, result)
assert_match(/^ 3\) Error:/, result)
+ end
- test_out.close
+ def sorting(*args)
+ IO.popen([*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_sorting.rb",
+ "--verbose", *args], err: [:child, :out]) {|f|
+ f.read
+ }
end
end