From 6aca925ef28bf0a0a311bc8e33ec9a5aa2ded6ad Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 5 Mar 2007 14:52:58 +0000 Subject: add tests from GHC testsuite --- tests/queryfdoption01.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/queryfdoption01.hs (limited to 'tests/queryfdoption01.hs') diff --git a/tests/queryfdoption01.hs b/tests/queryfdoption01.hs new file mode 100644 index 0000000..46833c1 --- /dev/null +++ b/tests/queryfdoption01.hs @@ -0,0 +1,11 @@ +import System.Posix.IO +import System.IO + +showNBR = do + v <- System.Posix.IO.queryFdOption 0 System.Posix.IO.NonBlockingRead + putStr $ "NonBlockingRead = " ++ (show v) ++ "\n" + +main = do + showNBR + System.Posix.IO.setFdOption 0 System.Posix.IO.NonBlockingRead True + showNBR -- cgit v1.2.3