1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_system.rb: tests without shell

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-02 16:44:22 +00:00
parent 0d829c4af4
commit 8b242a0d09

View file

@ -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