a test runner for your command line interfaces that runs off of "example usage" friendly markdown
Binaries are available for x86 and amd64 flavors of Darwin and Linux
wget -qO- https://github.com/benschw/jsonfilter/releases/download/0.1.0/cli-unit-`uname`-`uname -m`-0.1.0.gz | \ gunzip > /usr/local/bin/cli-unit chmod +x /usr/local/bin/cli-unit
Or add cli-unitw.sh to your project and fetch the binary when you need it (so that anyone who checks out your repo can run the tests without installing dependencies)
wget https://github.com/benschw/jsonfilter/releases/download/0.1.0/cli-unitw.sh chmod +x ./cli-unitw.sh
Add a test to your README.md
## Figlet, ascii art for the masses etc. etc. etc... ## Examples ### test: figlet should be able to make ascii art out of text #### when: figlet "cli-unit" #### then: _ _ _ _ ___| (_) _ _ _ __ (_) |_ / __| | |_____| | | | '_ \| | __| | (__| | |_____| |_| | | | | | |_ \___|_|_| \__,_|_| |_|_|\__| ### test: "-f script" should make output cursive #### when: figlet -f script "cli-unit" #### then: _ | | o o __ | | _ _ _|_ / |/ |-----| | / |/ | | | \___/|__/|_/ \_/|_/ | |_/|_/|_/
Check that your example works (the "then" block matches the output from running the "when" block):
./cli-unitw.sh README.md Pass (2/2 tests successful)
And point people to your beautiful project page, complete with examples you know will stay up to date:
etc. etc. etc...
figlet "cli-unit"
_ _ _ _ ___| (_) _ _ _ __ (_) |_ / __| | |_____| | | | '_ \| | __| | (__| | |_____| |_| | | | | | |_ \___|_|_| \__,_|_| |_|_|\__|
figlet -f script "cli-unit"
_ | | o o __ | | _ _ _|_ / |/ |-----| | / |/ | | | \___/|__/|_/ \_/|_/ | |_/|_/|_/
More examples on the github project page