@@ -581,14 +581,18 @@ t_builderAssociative s1 s2 s3 = TB.toLazyText (b1 `mappend` (b2 `mappend` b3)) =
582-- Input and output.
582-- Input and output.
584−t_write_read (NotEmpty t) = monadicIO $ do
584+t_write_read t = monadicIO $ assert . (==t) =<< run act
587 where act = withTempFile $ \path h -> do
585 where act = withTempFile $ \path h -> do
588 T.hPutStr h t
586 T.hPutStr h t
590 T.readFile path
588 T.readFile path
590+t_write_hGetContents t = monadicIO $ assert . (==t) =<< run act
591+ where act = withTempFile $ \_path h -> do
593+ hSeek h AbsoluteSeek 0
592-- Low-level.
596-- Low-level.
594t_dropWord16 m t = dropWord16 m t `T.isSuffixOf` t
598t_dropWord16 m t = dropWord16 m t `T.isSuffixOf` t
@@ -981,7 +985,8 @@ tests = [
983 testGroup "io" [
987 testGroup "io" [
984− testProperty "t_write_read" t_write_read
988+ testProperty "t_write_read" t_write_read,
989+ testProperty "t_write_hGetContents" t_write_hGetContents
987 testGroup "lowlevel" [
992 testGroup "lowlevel" [