summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-25 12:18:50 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-25 12:18:50 +0000
commit34bcba57a9c432917799d59649f311eb0794a362 (patch)
tree88abf20863dceaa69008f524be14a65cf4f4dc3b /test
parent54e45b30cc0dde9af781113efc18bd9a964a0a49 (diff)
downloadruby-34bcba57a9c432917799d59649f311eb0794a362.tar.gz
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb21
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