diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-02 16:39:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-02 16:39:16 +0000 |
commit | 0d829c4af4857ef5ca3446dd39c00f789ab39d3a (patch) | |
tree | 0683d69c90b7bf8a18a3031f762520f89a76c033 | |
parent | 2cbb6fa2186ea20b61d837babcd1015aa8a5004f (diff) | |
download | ruby-0d829c4af4857ef5ca3446dd39c00f789ab39d3a.tar.gz |
test_system.rb: exit by abort for portability
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_system.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index af80009fea..e1b03322cf 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -165,14 +165,15 @@ class TestSystem < Test::Unit::TestCase ruby = EnvUtil.rubybin assert_nothing_raised do system('feature_14235', exception: false) - system("'#{ruby}' -e 'exit 1'", 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 - e = assert_raise(RuntimeError) do - system("'#{ruby}' -e 'exit 1'", exception: true) + assert_raise_with_message(RuntimeError, /\ACommand failed with exit /) do + system("'#{ruby}' -e abort", exception: true) end - assert_match /\ACommand failed with exit 1:/, e.message end end |