From aa945be118f557284024f43125d085998ad7fa36 Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Tue, 12 Aug 2008 10:34:34 -0500 Subject: [PATCH] Added writeBytes test --- testsrc/TestConnection.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testsrc/TestConnection.hs b/testsrc/TestConnection.hs index 97c7f03..79e7097 100644 --- a/testsrc/TestConnection.hs +++ b/testsrc/TestConnection.hs @@ -66,9 +66,15 @@ prop_readBytes s l = LT -> Right (take l s, (drop l s, [])) GT -> Left "EOF in input in readBytes" +prop_writeBytes :: [String] -> Result +prop_writeBytes s = + runStringConnection [] (\c -> mapM_ (writeBytes c) s) @?= + Right ((), ([], concat s)) + allt = [q "Identity" prop_identity, q "Lines identity" prop_linesidentity, q "Lines list identity" prop_lineslistidentity, q "readline" prop_readLine, - q "readBytes" prop_readBytes + q "readBytes" prop_readBytes, + q "writeBytes" prop_writeBytes ] -- 2.39.2