summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/IO/hReady001.hs
blob: 00888dac2d97549b33cb7a3c6a6c02e026aed012 (plain)
1
2
3
4
5
6
7
8
9
10
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