diff options
Diffstat (limited to 'test/fiber/test_process.rb')
-rw-r--r-- | test/fiber/test_process.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/fiber/test_process.rb b/test/fiber/test_process.rb index c6583cac9b..a5990be204 100644 --- a/test/fiber/test_process.rb +++ b/test/fiber/test_process.rb @@ -33,4 +33,19 @@ class TestFiberProcess < Test::Unit::TestCase end end.join end + + def test_fork + omit 'fork not supported' unless Process.respond_to?(:fork) + Thread.new do + scheduler = Scheduler.new + Fiber.set_scheduler scheduler + + Fiber.schedule do + pid = Process.fork {} + Process.wait(pid) + + assert_predicate $?, :success? + end + end.join + end end |