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.
You have just read Testing generated static sites, written on May 29, 2015. This is Today I Learned, a collection of random tidbits I've learned through my day-to-day web development work. I'm Rico Sta. Cruz, @rstacruz on GitHub (and Twitter!).