summaryrefslogtreecommitdiff
path: root/libraries/base/tests/IO/hReady001.hs
blob: ef206876d6aa3d2a7f10b7124f3062be5e367b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- !!! hReady test

 -- hReady should throw and EOF exception at the end of a file. #1063.

import System.IO
import System.IO.Error

main = do
 h <- openFile "hReady001.hs" ReadMode
 hReady h >>= print
 hSeek h SeekFromEnd 0
 (hReady h >> return ()) `catchIOError` print