mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
955a38da08
rb_bug_reporter_add() allows to register a function which is called at rb_bug() called. * ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API. * ext/-test-/bug_reporter/extconf.rb: ditto. * test/-ext-/bug_reporter/test_bug_reporter.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
9 lines
381 B
Ruby
9 lines
381 B
Ruby
require 'test/unit'
|
|
require_relative "../../ruby/envutil"
|
|
|
|
class TestBugReporter < Test::Unit::TestCase
|
|
def test_bug_reporter_add
|
|
expected_stderr = /Sample bug reporter: 12345/
|
|
assert_in_out_err(["--disable-gems", "-r-test-/bug_reporter/bug_reporter", "-e", "register_sample_bug_reporter(12345); Process.kill :SEGV, $$"], "", [], expected_stderr, nil)
|
|
end
|
|
end
|