aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_rubyoptions.rb21
2 files changed, 26 insertions, 0 deletions
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 <mame@tsg.ne.jp>
+
+ * test/ruby/test_rubyoptions.rb (test_segv_test): add a test for
+ bugreport trace dumper.
+
Mon Jan 25 17:47:02 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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`<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