summaryrefslogtreecommitdiff
path: root/test/-ext-/bug_reporter
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 08:59:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 08:59:46 +0000
commite1ba2d418ad6f4e9e63e9db05ff5602e0f379652 (patch)
tree50302c5807a4fe65e5341b0315076aeaf5f8f8a9 /test/-ext-/bug_reporter
parent723cee93c481e62579e5353d9128e1538381cbab (diff)
* test/ruby/envutil.rb (assert_pattern_list) Renamed from
assert_regexp_list. Show multiline string in multi lines. * test/-ext-/bug_reporter/test_bug_reporter.rb: Use assert_pattern_list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/bug_reporter')
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb
index 2e5e332074..3f804a633a 100644
--- a/test/-ext-/bug_reporter/test_bug_reporter.rb
+++ b/test/-ext-/bug_reporter/test_bug_reporter.rb
@@ -4,13 +4,21 @@ require_relative "../../ruby/envutil"
class TestBugReporter < Test::Unit::TestCase
def test_bug_reporter_add
- expected_stderr = /Sample bug reporter: 12345/
+ expected_stderr = [
+ :*,
+ /\[BUG\]\sSegmentation\sfault.*\n/,
+ /#{ Regexp.quote(RUBY_DESCRIPTION) }\n\n/,
+ :*,
+ /Sample bug reporter: 12345/,
+ :*
+ ]
tmpdir = Dir.mktmpdir
- assert_in_out_err(["--disable-gems", "-r-test-/bug_reporter/bug_reporter",
- "-C", tmpdir],
- "register_sample_bug_reporter(12345); Process.kill :SEGV, $$",
- [],
- expected_stderr, nil)
+
+ 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)
+ assert_pattern_list(expected_stderr, stderr)
ensure
FileUtils.rm_rf(tmpdir) if tmpdir
end