Skip to content

Instantly share code, notes, and snippets.

@sideshowcoder
Created October 26, 2013 17:37
Show Gist options
  • Save sideshowcoder/7172327 to your computer and use it in GitHub Desktop.
Save sideshowcoder/7172327 to your computer and use it in GitHub Desktop.
Testing shell scripts with assert.sh
#!/bin/bash
echo "I do work!"
#!/bin/bash
. assert.sh
assert "./example.sh" "I do work!"
assert_end examples
$ chmod +x example.sh example.test.sh
$ wget https://raw.github.com/lehmannro/assert.sh/master/assert.sh
$ ./example.test.sh
all 1 examples tests passed in 0s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment