diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-03 05:20:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-03 05:20:22 +0000 |
commit | 5eea2af4811ead7f9935a6670c7e672379f4cf92 (patch) | |
tree | e5734f8f7a2f4a096627c26544bfc2f9992bdd45 /test/ruby/test_rubyoptions.rb | |
parent | 37788267802349c3b6c8fa4e28664872bc391d60 (diff) |
test_rubyoptions.rb: use assert_segv
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): use
assert_segv to simplify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 0ff96aee0a..b1ecef402a 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -571,26 +571,14 @@ class TestRubyOptions < Test::Unit::TestCase end def test_segv_loaded_features - opts = SEGVTest::ExecOptions.dup - bug7402 = '[ruby-core:49573]' - status = Dir.mktmpdir("segv_test") do |tmpdir| - assert_in_out_err(['-e', 'class Bogus; def to_str; exit true; end; end', - '-e', '$".clear', - '-e', '$".unshift Bogus.new', - '-e', '(p $"; abort) unless $".size == 1', - '-e', 'Process.kill :SEGV, $$', - '-C', tmpdir, - ], - "", [], //, - nil, - opts) - end - if signo = status.termsig - sleep 0.1 - EnvUtil.diagnostic_reports(Signal.signame(signo), EnvUtil.rubybin, status.pid, Time.now) - end + status = assert_segv(['-e', 'END {Process.kill :SEGV, $$}', + '-e', 'class Bogus; def to_str; exit true; end; end', + '-e', '$".clear', + '-e', '$".unshift Bogus.new', + '-e', '(p $"; abort) unless $".size == 1', + ]) assert_not_predicate(status, :success?, "segv but success #{bug7402}") end |