mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
a3656d4222
commit
61cd4e9dda
1 changed files with 4 additions and 1 deletions
|
@ -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?)
|
||||
|
|
Loading…
Reference in a new issue