summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-25 08:00:50 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-25 08:00:50 +0000
commitfebab308c87f721d9b7491d37e345d0130a4bca2 (patch)
tree9ce5c153f0f30b4637ad4b58898ca7a3fcea8524 /test/ruby
parent59e1e822a189f8b4c89c3216dd1d82b827969c46 (diff)
Add test for r38543 [Bug #7597] [ruby-dev:46786]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 12879c3b8b..2b689546ee 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -481,7 +481,7 @@ class TestRubyOptions < Test::Unit::TestCase
opts[:rlimit_core] = 0
additional = ""
end
- assert_in_out_err(["-e", "Process.kill :SEGV, $$"], "", [],
+ expected_stderr =
%r(\A
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault\n
#{ Regexp.quote(RUBY_DESCRIPTION) }\n\n
@@ -505,9 +505,8 @@ class TestRubyOptions < Test::Unit::TestCase
\n
(?:#{additional})
\z
- )x,
- nil,
- opts)
+ )x
+ assert_in_out_err(["-e", "Process.kill :SEGV, $$"], "", [], expected_stderr, nil, opts)
bug7402 = '[ruby-core:49573]'
status = assert_in_out_err(['-e', 'class Bogus; def to_str; exit true; end; end',
@@ -517,6 +516,13 @@ class TestRubyOptions < Test::Unit::TestCase
nil,
opts)
assert_not_predicate(status, :success?, "segv but success #{bug7402}")
+
+ bug7597 = '[ruby-dev:46786]'
+ t = Tempfile.new(["test_ruby_test_bug7597", ".rb"])
+ t.write "f" * 100
+ t.flush
+ assert_in_out_err("-e'$0=$stdin.read; Process.kill :SEGV, $$'", t.path, [], expected_stderr, bug7597)
+ t.close
end
def test_DATA