Test command-line applications through .should files

should is a single-file program to test command-line applications on Unix-like systems. It checks the standard output, or possibly another file, and parses for exact or regular expressions, possibly while counting them and checking their number of occurrences.

It outputs reports in .tap format and in JUnit-like XML. should is written in Python with no external dependencies except from Python >= 3.4 and is intended to work on any command-line application -- should your application outputs something, you can test it!

> cat hello.should
echo "hello, world"

> ./should demo/hello.should
==> ok - ok:2 - total:2 tests

Should can check occurrences counts, look for regular expressions, use variables, filter tests, check exit codes... See the documentation and the gitlab.

Download should 2.0.0 (2019-04-01)