diff options
Diffstat (limited to 'testsuite/tests/lib/IO/hReady001.hs')
-rw-r--r-- | testsuite/tests/lib/IO/hReady001.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IO/hReady001.hs b/testsuite/tests/lib/IO/hReady001.hs new file mode 100644 index 0000000000..00888dac2d --- /dev/null +++ b/testsuite/tests/lib/IO/hReady001.hs @@ -0,0 +1,11 @@ +-- !!! hReady test + + -- hReady should throw and EOF exception at the end of a file. Trac #1063. + +import System.IO + +main = do + h <- openFile "hReady001.hs" ReadMode + hReady h >>= print + hSeek h SeekFromEnd 0 + (hReady h >> return ()) `catch` print |