Assuming EXIT_SUCCESS equals 0 is not portable

This commit is contained in:
Nobuyoshi Nakada 2022-01-19 14:14:02 +09:00
parent 528344b8de
commit 5c7af72304
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
Notes: git 2022-01-19 21:54:26 +09:00

View File

@ -396,7 +396,7 @@ class TestFiber < Test::Unit::TestCase
Fiber.new {}.transfer
Fiber.new { Fiber.yield }
end
exit!(0)
exit!(true)
end
}.transfer
_, status = Process.waitpid2(xpid)
@ -405,8 +405,8 @@ class TestFiber < Test::Unit::TestCase
end.resume
end
pid, status = Process.waitpid2(pid)
assert_equal(0, status.exitstatus, bug5700)
assert_equal(false, status.signaled?, bug5700)
assert_not_predicate(status, :signaled?, bug5700)
assert_predicate(status, :success?, bug5700)
end
def test_exit_in_fiber