You can make a test script use grep
and test
to check for generated output. Since grep will die with an error code if it doesn't match anything, the test will be considered a failure.
You can even integrate these with your Travis-CI tests. (Learn more about build configuration from their documentation.)
Another good way is to use a Makefile
so you can simply use make test
to invoke tests.