diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-03-09 11:42:24 +0000 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-03-09 13:04:46 +0000 |
commit | 7e84795cdd797cc3718dfce730e8a7c6a2a31b63 (patch) | |
tree | 4035924f4671336aa57028a42b4e3abca7673235 /libraries/base/tests/hPutBuf002.hs | |
parent | ba85754a049791ee795ba887e698523f1885d3f3 (diff) | |
download | haskell-7e84795cdd797cc3718dfce730e8a7c6a2a31b63.tar.gz |
Copy tests from GHC testsuite; part of #1161.
Diffstat (limited to 'libraries/base/tests/hPutBuf002.hs')
-rw-r--r-- | libraries/base/tests/hPutBuf002.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/base/tests/hPutBuf002.hs b/libraries/base/tests/hPutBuf002.hs new file mode 100644 index 0000000000..a7ea2eed03 --- /dev/null +++ b/libraries/base/tests/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 |