about summary refs log tree commit homepage
path: root/test/test_eventfd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_eventfd.rb')
-rw-r--r--test/test_eventfd.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_eventfd.rb b/test/test_eventfd.rb
index 4780c48..7739448 100644
--- a/test/test_eventfd.rb
+++ b/test/test_eventfd.rb
@@ -27,6 +27,15 @@ class TestEventFD < Test::Unit::TestCase
     assert_equal(Fcntl::O_NONBLOCK, flags)
   end if defined?(EventFD::NONBLOCK)
 
+  def test_new_nonblock_cloexec_sym
+    efd = EventFD.new(0, [:NONBLOCK,:CLOEXEC])
+    flags = efd.fcntl(Fcntl::F_GETFL) & Fcntl::O_NONBLOCK
+    assert_equal(Fcntl::O_NONBLOCK, flags)
+
+    flags = efd.fcntl(Fcntl::F_GETFD) & Fcntl::FD_CLOEXEC
+    assert_equal(Fcntl::FD_CLOEXEC, flags)
+  end if defined?(EventFD::NONBLOCK) && defined?(EventFD::CLOEXEC)
+
   def test_new_cloexec
     efd = EventFD.new(0, EventFD::CLOEXEC)
     flags = efd.fcntl(Fcntl::F_GETFD) & Fcntl::FD_CLOEXEC