diff options
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 6900d03b70..3aeb54f935 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -94,16 +94,15 @@ module Test if status.coredump? sigdesc << " (core dumped)" end + full_message = '' + if !message.empty? + full_message << message << "\n" + end if msg.empty? - full_message = build_message(message, "pid ? killed by ?", - pid, - AssertionMessage::Literal.new(sigdesc)) + full_message << "pid #{pid} killed by #{sigdesc}" else msg << "\n" if /\n\z/ !~ msg - full_message = build_message(message, "pid ? killed by ?\n?", - pid, - AssertionMessage::Literal.new(sigdesc), - AssertionMessage::Literal.new(msg.gsub(/^/, '| '))) + full_message << "pid #{pid} killed by #{sigdesc}\n#{msg.gsub(/^/, '| ')}" end end assert_block(full_message) { !status.signaled? } |