diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-06-16 19:18:11 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-06-16 19:18:11 +0900 |
commit | f0371efbd87f72f140cbb6ea105a261ff1b23772 (patch) | |
tree | e8db9c710d28d9ec42f5c11c88dc9ff2592da7d5 /test/ruby/test_rubyoptions.rb | |
parent | 85e61eac8579f09d76cd9a24f9c6fc23db80664c (diff) |
Suppress stderr output in `TestRubyOptions#assert_segv`
It is checked against the given `list`, do not print the same output
twice.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13624
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index e2c3a687c4..69f30c1ce3 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -787,6 +787,12 @@ class TestRubyOptions < Test::Unit::TestCase unless /mswin|mingw/ =~ RUBY_PLATFORM opts[:rlimit_core] = 0 end + opts[:failed] = proc do |status, message = "", out = ""| + if (sig = status.termsig) && Signal.list["SEGV"] == sig + out = "" + end + Test::Unit::CoreAssertions::FailDesc[status, message] + end ExecOptions = opts.freeze # The regexp list that should match the entire stderr output. |