vty-5.2.1: A simple terminal UI library

Safe HaskellNone



This provides a mock terminal implementation that is nice for testing. This transforms the output operations to visible characters. Which is nice for some tests.



mockTerminal :: (Applicative m, MonadIO m) => DisplayRegion -> m (MockData, Output)Source

The mock display terminal produces a string representation of the requested picture. There is *not* an isomorphism between the string representation and the picture. The string representation is a simplification of the picture that is only useful in debugging VTY without considering terminal specific issues.

The mock implementation is useful in manually determining if the sequence of terminal operations matches the expected sequence. So requirement of the produced representation is simplicity in parsing the text representation and determining how the picture was mapped to terminal operations.

The string representation is a sequence of identifiers where each identifier is the name of an operation in the algebra.