diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-12-08 09:29:09 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-12-09 08:55:35 +1300 |
commit | 2553c5f94a5d51c2c5876b31e4c1521ad9be12f6 (patch) | |
tree | fc7b8fe6e578424b15dea0f8b94caa7a72b5c0a1 /test/ruby/test_process.rb | |
parent | a4a92ae6d99a75e11165ca09c44ccf47cf342047 (diff) | |
download | ruby-2553c5f94a5d51c2c5876b31e4c1521ad9be12f6.tar.gz |
Add support for non-blocking `Process.wait`.
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r-- | test/ruby/test_process.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 65af494bd6..4f96a623e0 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2492,6 +2492,12 @@ EOS assert_same(Process.last_status, $?) end + def test_last_status_failure + assert_nil system("sad") + assert_not_predicate $?, :success? + assert_equal $?.exitstatus, 127 + end + def test_exec_failure_leaves_no_child assert_raise(Errno::ENOENT) do spawn('inexistent_command') |