From d2f04d332f2ff04f25202ed38e23de526a9aea46 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 16 Dec 2019 09:44:01 +0900 Subject: Kernel#abort without arguments should print error info [Bug #16424] --- test/ruby/test_process.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 72120e4508..32b415c1b3 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1509,7 +1509,17 @@ class TestProcess < Test::Unit::TestCase def test_abort with_tmpchdir do s = run_in_child("abort") - assert_not_equal(0, s.exitstatus) + assert_not_predicate(s, :success?) + write_file("test-script", "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + STDERR.reopen(STDOUT) + begin + raise "[Bug #16424]" + rescue => e + abort + end + end; + assert_include(IO.popen([RUBY, "test-script"], &:read), "[Bug #16424]") end end -- cgit v1.2.3