Created
October 26, 2013 17:37
-
-
Save sideshowcoder/7172327 to your computer and use it in GitHub Desktop.
Testing shell scripts with assert.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "I do work!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. assert.sh | |
assert "./example.sh" "I do work!" | |
assert_end examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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