From 8b242a0d09bec00b2cfc1c779edaaac453bf05bc Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 2 Feb 2018 16:44:22 +0000 Subject: test_system.rb: tests without shell git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_system.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3