proctest- An IO library for testing interactive command line programs

Safe HaskellSafe-Infered




Helpers for asserting certain things for programs, using HUnit.

All of the assertions in this module throw HUnit exceptions on failure using assertFailure.


Starting programs

runAssert :: Timeout -> FilePath -> [String] -> IO (Handle, Handle, Handle, ProcessHandle)Source

Runs the given program with run and asserts that it is still running after the given timeout.

Don't choose the timeout too high as this function will block for it.

If the timeout is exceeded, a HUnit assertFailure exception is thrown, showing the command line to be invoked, the exit code, and the standard error output of the program.