diff options
Diffstat (limited to 'testsuite/tests/lib/IOExts/hPutBuf002.hs')
-rw-r--r-- | testsuite/tests/lib/IOExts/hPutBuf002.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IOExts/hPutBuf002.hs b/testsuite/tests/lib/IOExts/hPutBuf002.hs new file mode 100644 index 0000000000..a7ea2eed03 --- /dev/null +++ b/testsuite/tests/lib/IOExts/hPutBuf002.hs @@ -0,0 +1,9 @@ +import System.IO +import Foreign +import Foreign.C + +-- !!! this test failed to write anything in GHC 5.00.2 +main = do + h <- openBinaryFile "hPutBuf002.out" ReadWriteMode + withCStringLen "hello world\n" $ \(ptr,len) -> hPutBuf h ptr len + hFileSize h >>= print |