diff options
Diffstat (limited to 'test/-ext-/wait_for_single_fd')
-rw-r--r-- | test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb index 76ef68002a..c7dd0909f0 100644 --- a/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb +++ b/test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb @@ -29,4 +29,14 @@ class TestWaitForSingleFD < Test::Unit::TestCase end end end + + def test_wait_for_closed_pipe + with_pipe do |r,w| + w.close + rc = IO.wait_for_single_fd(r.fileno, RB_WAITFD_IN, nil) + assert_equal RB_WAITFD_IN, rc + end + end + + end |