ruby-changes:37743
From: nobu <ko1@a...>
Date: Tue, 3 Mar 2015 17:20:12 +0900 (JST)
Subject: [ruby-changes:37743] nobu:r49824 (trunk): test_rubyoptions.rb: use assert_in_out_err
nobu 2015-03-03 17:19:43 +0900 (Tue, 03 Mar 2015) New Revision: 49824 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49824 Log: test_rubyoptions.rb: use assert_in_out_err * test/ruby/test_rubyoptions.rb (assert_segv): assert_in_out_err with the pattern list instead of invoke_ruby. * test/-ext-/bug_reporter/test_bug_reporter.rb (test_bug_reporter_add): ditto. Modified files: trunk/test/-ext-/bug_reporter/test_bug_reporter.rb trunk/test/ruby/test_rubyoptions.rb Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 49823) +++ test/ruby/test_rubyoptions.rb (revision 49824) @@ -552,18 +552,9 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L552 def assert_segv(args, message=nil) test_stdin = "" opt = SEGVTest::ExecOptions.dup + list = SEGVTest::ExpectedStderrList - _, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, false, true, **opt) - stderr.force_encoding("ASCII-8BIT") - - if signo = status.termsig - sleep 0.1 - EnvUtil.diagnostic_reports(Signal.signame(signo), EnvUtil.rubybin, status.pid, Time.now) - end - - assert_pattern_list(SEGVTest::ExpectedStderrList, stderr, message) - - status + assert_in_out_err(args, test_stdin, //, list, encoding: "ASCII-8BIT", **opt) end def test_segv_test Index: test/-ext-/bug_reporter/test_bug_reporter.rb =================================================================== --- test/-ext-/bug_reporter/test_bug_reporter.rb (revision 49823) +++ test/-ext-/bug_reporter/test_bug_reporter.rb (revision 49824) @@ -16,9 +16,7 @@ class TestBugReporter < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/-ext-/bug_reporter/test_bug_reporter.rb#L16 args = ["--disable-gems", "-r-test-/bug_reporter/bug_reporter", "-C", tmpdir] stdin = "register_sample_bug_reporter(12345); Process.kill :SEGV, $$" - _, stderr, status = EnvUtil.invoke_ruby(args, stdin, false, true) - stderr.force_encoding("ASCII-8BIT") - assert_pattern_list(expected_stderr, stderr) + assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT") ensure FileUtils.rm_rf(tmpdir) if tmpdir end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/