diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index d4143cffb8..f1897c5d0b 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -320,4 +320,25 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(["-r", notexist, "-ep"], "", [], pat) assert_in_out_err([notexist], "", [], pat) end + + def test_segv_test + assert_in_out_err(["-e", "Process.kill :SEGV, $$"], "", [], + %r(\A + -e:1:\s\[BUG\]\sSegmentation\sfault\n + #{ Regexp.quote(RUBY_DESCRIPTION) }\n\n + --\scontrol\sframe\s----------\n + (?:c:.*\n)* + ---------------------------\n + -e:1:in\s`<main>'\n + -e:1:in\s`kill'\n\n + (?: + --\sC\slevel\sbacktrace\sinformation\s-------------------------------------------\n + (?:.*\s\[0x\h+\]\n)*\n + )? + \[NOTE\]\n + You\smay\shave\sencountered\sa\sbug\sin\sthe\sRuby\sinterpreter\sor\sextension\slibraries.\n + Bug\sreports\sare\swelcome.\n + For\sdetails:\shttp:\/\/www.ruby-lang.org/bugreport.html\n\n\z + )x) + end end |