From 61cd4e9dda5a5741f44308c96758a81fd4724621 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 11 May 2014 03:19:29 +0000 Subject: 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 5abc5bca0b..3e7f3b6964 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1203,11 +1203,14 @@ class TestProcess < Test::Unit::TestCase 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?) -- cgit v1.2.3