ruby-changes:33837
From: nobu <ko1@a...>
Date: Sun, 11 May 2014 12:19:41 +0900 (JST)
Subject: [ruby-changes:33837] nobu:r45918 (trunk): test_process.rb: WIFEXITED and so on are system dependent
nobu 2014-05-11 12:19:29 +0900 (Sun, 11 May 2014) New Revision: 45918 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45918 Log: test_process.rb: WIFEXITED and so on are system dependent * test/ruby/test_process.rb (test_status_kill): WIFEXITED and so on are available only if signal is supported by the system. [ruby-dev:48203] [Bug #9820] Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 45917) +++ test/ruby/test_process.rb (revision 45918) @@ -1203,11 +1203,14 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1203 return unless Process.respond_to?(:kill) return unless Signal.list.include?("KILL") + # assume the system supports signal if SIGQUIT is available + expected = Signal.list.include?("QUIT") ? [false, true, false, nil] : [true, false, false, true] + with_tmpchdir do write_file("foo", "Process.kill(:KILL, $$); exit(42)") system(RUBY, "foo") s = $? - assert_equal([false, true, false, nil], + assert_equal(expected, [s.exited?, s.signaled?, s.stopped?, s.success?], "[s.exited?, s.signaled?, s.stopped?, s.success?]") assert_equal(false, s.exited?) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/