diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-16 09:44:01 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2019-12-16 14:55:59 +0900 |
commit | d2f04d332f2ff04f25202ed38e23de526a9aea46 (patch) | |
tree | 905bd8eeda8249a8b1338416703d1254555a5581 /test | |
parent | 1e80a208cc44cbbdd4e49d6146eea29cde5cd42a (diff) | |
download | ruby-d2f04d332f2ff04f25202ed38e23de526a9aea46.tar.gz |
Kernel#abort without arguments should print error info
[Bug #16424]
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 12 |
1 files changed, 11 insertions, 1 deletions
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 |