@@ -39,7 +39,7 @@ import qualified Data.Text.Lazy.Search as S (indices)
39import qualified SlowFunctions as Slow
39import qualified SlowFunctions as Slow
41import QuickCheckUtils (NotEmpty(..), small, genUnicode)
41import QuickCheckUtils (NotEmpty(..), small, genUnicode)
42−import TestUtils (withTempFile)
42+import TestUtils (withRedirect, withTempFile)
44-- Ensure that two potentially bottom values (in the sense of crashing
44-- Ensure that two potentially bottom values (in the sense of crashing
45-- for some inputs, not looping infinitely) either both crash, or both
45-- for some inputs, not looping infinitely) either both crash, or both
@@ -636,6 +636,12 @@ write_read unline filt writer reader (E _ e) m ts =
636 r <- reader h'
636 r <- reader h'
637 r `deepseq` return r
637 r `deepseq` return r
639+t_put_get = write_read T.unlines T.filter put get
640+ where put h = withRedirect h stdout . T.putStr
641+ get h = withRedirect h stdin T.getContents
642+tl_put_get = write_read TL.unlines TL.filter put get
643+ where put h = withRedirect h stdout . TL.putStr
644+ get h = withRedirect h stdin TL.getContents
639t_write_read = write_read T.unlines T.filter T.hPutStr T.hGetContents
645t_write_read = write_read T.unlines T.filter T.hPutStr T.hGetContents
640tl_write_read = write_read TL.unlines TL.filter TL.hPutStr TL.hGetContents
646tl_write_read = write_read TL.unlines TL.filter TL.hPutStr TL.hGetContents
@@ -1043,6 +1049,10 @@ tests = [
1043 testProperty "tl_write_read" tl_write_read,
1049 testProperty "tl_write_read" tl_write_read,
1044 testProperty "t_write_read_line" t_write_read_line,
1050 testProperty "t_write_read_line" t_write_read_line,
1045 testProperty "tl_write_read_line" tl_write_read_line
1051 testProperty "tl_write_read_line" tl_write_read_line
1052+ -- These tests are subject to I/O race conditions when run under
1053+ -- test-framework-quickcheck2.
1054+ -- testProperty "t_put_get" t_put_get
1055+ -- testProperty "tl_put_get" tl_put_get
1048 testGroup "lowlevel" [
1058 testGroup "lowlevel" [