From 34bcba57a9c432917799d59649f311eb0794a362 Mon Sep 17 00:00:00 2001 From: mame Date: Mon, 25 Jan 2010 12:18:50 +0000 Subject: * test/ruby/test_rubyoptions.rb (test_segv_test): add a test for bugreport trace dumper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/test_rubyoptions.rb | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3a0c85eddb..ead7f5dbff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 25 21:17:32 2010 Yusuke Endoh + + * test/ruby/test_rubyoptions.rb (test_segv_test): add a test for + bugreport trace dumper. + Mon Jan 25 17:47:02 2010 Nobuyoshi Nakada * ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and 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`
'\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 -- cgit v1.2.3