Bash unit tests with TAP output. Do you have shell commands you want to write automated tests for? This tool gives you an assert method that you can use to describe and test your code.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status

expect - a simple test method for bash scripts with valid TAP v13 output


clone this repo and run make install (you may need to sudo that)


here's an example test file. let's say you named it under test/random_tests:

expect "the file to exist" $(test -f Makefile)
expect "the file to not exist" $(test ! -f
expect "this to exit with 0" $(exit 0)
expect "output to do something" $(echo hi)

running tests

to run the above example, just execute expect test/random_tests


default output is not TAP. to get tap output pass a -o tap argument when running your tests: expect test/random_tests -o tap