Commit 1fe88d15 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-06-18 13:02:22 by simonmar]

add another missing end-of-line test for hGetLine
parent 2fb8fe49
......@@ -14,6 +14,7 @@ test "hGetChar001" { vtr("","","") }
test "hGetLine001" { $stdin = "hGetLine001.hs"
vtr("-cpp","","") }
test "hGetLine002" { vtr("","","") }
test "hGetLine003" { vtr("","","") }
test "hGetPosn001" { vtr("-cpp","","") }
test "hIsEOF001" { vtr("","","") }
test "hIsEOF002" { vtr("-cpp","","") }
......
import IO
main = f stdin
where f h = do p <- hIsEOF h
if p then putStrLn "done"
else do l <- hGetLine h
putStrLn l
f h
this line doesn't end with a newline
this line doesn't end with a newline
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment