diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index e1b03322cf..c56e2a13c4 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -166,12 +166,18 @@ class TestSystem < Test::Unit::TestCase assert_nothing_raised do system('feature_14235', exception: false) end + assert_nothing_raised do + system(ruby, "-e", "abort", exception: false) + end assert_nothing_raised do system("'#{ruby}' -e abort", exception: false) end assert_raise(Errno::ENOENT) do system('feature_14235', exception: true) end + assert_raise_with_message(RuntimeError, /\ACommand failed with exit /) do + system(ruby, "-e", "abort", exception: true) + end assert_raise_with_message(RuntimeError, /\ACommand failed with exit /) do system("'#{ruby}' -e abort", exception: true) end