diff options
Diffstat (limited to 'testsuite/tests/lib/IO/readwrite003.hs')
-rw-r--r-- | testsuite/tests/lib/IO/readwrite003.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IO/readwrite003.hs b/testsuite/tests/lib/IO/readwrite003.hs new file mode 100644 index 0000000000..d7ee78d637 --- /dev/null +++ b/testsuite/tests/lib/IO/readwrite003.hs @@ -0,0 +1,12 @@ +import System.IO + +file = "readwrite003.txt" + +main = do + writeFile file "ab\ncd\nef\ngh" + h <- openFile file ReadWriteMode + hGetLine h + hPutStrLn h "yz" + hClose h + h <- openBinaryFile file ReadMode + hGetContents h >>= putStr |