X-Git-Url: https://code.delx.au/offlineimap/blobdiff_plain/1aa1358690388738fc102c6f319cb2f4a1f860b3..aa945be118f557284024f43125d085998ad7fa36:/testsrc/TestConnection.hs 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 ]