attoparsec-framer-0.1.0.0: Use Attoparsec to parse framed protocol bytestreams
Copyright(c) 2022 Tim Emiola
LicenseBSD3
MaintainerTim Emiola <adetokunbo@emio.la>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Attoparsec.Framer.Testing

Description

This module provides combinators that simplify unit tests of code that use Framers.

Synopsis

testing combinators

parsesFromFramerOk :: Eq a => (a -> ByteString) -> Parser a -> Word32 -> [a] -> IO Bool Source #

Creates a Framer and uses 'runFramer to confirm that the expect frames are received '

chunksOfN :: Int -> ByteString -> [ByteString] Source #

Split a ByteString into chunks of given size