[前][次][番号順一覧][スレッド一覧]

ruby-changes:50049

From: nobu <ko1@a...>
Date: Sat, 3 Feb 2018 01:39:22 +0900 (JST)
Subject: [ruby-changes:50049] nobu:r62167 (trunk): test_system.rb: exit by abort for portability

nobu	2018-02-03 01:39:16 +0900 (Sat, 03 Feb 2018)

  New Revision: 62167

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62167

  Log:
    test_system.rb: exit by abort for portability

  Modified files:
    trunk/test/ruby/test_system.rb
Index: test/ruby/test_system.rb
===================================================================
--- test/ruby/test_system.rb	(revision 62166)
+++ test/ruby/test_system.rb	(revision 62167)
@@ -165,14 +165,15 @@ class TestSystem < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_system.rb#L165
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]