When you make a standalone application intended as a command line tool you may want integration tests to exercise the application through the normal command line user interface. There are tools that can do this testing on OS executable applications but sometimes it is useful to run these tests as part of the test suite without having to first build a standalone binary. The goal then is to test a function that only interacts via standard input and output. This code demonstrates how it can be d...