diff options
Diffstat (limited to 'testsuite/tests/lib/IO/hClose001.hs')
-rw-r--r-- | testsuite/tests/lib/IO/hClose001.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IO/hClose001.hs b/testsuite/tests/lib/IO/hClose001.hs new file mode 100644 index 0000000000..8d31447e95 --- /dev/null +++ b/testsuite/tests/lib/IO/hClose001.hs @@ -0,0 +1,8 @@ +import System.IO +import System.IO.Error + +main = do + h <- openFile "hClose001.tmp" WriteMode + hPutStr h "junk" + hClose h + hPutStr h "junk" `catchIOError` \ err -> if isIllegalOperation err then putStr "Okay\n" else error "Not okay\n" |