M

main-tester

Capture stdout/stderr/exit code, and replace stdin of your main function in Haskell.