3 # An example of using shunit2.
5 # Author: Chris Koeritz
7 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
9 if [[ ! "$0" =~ ^/.* ]]; then
10 # re-run the script with the absolute path if it didn't start that way; otherwise
11 # shunit is not happy with finding the script.
12 exec "$WORKDIR/$(basename $0)" $*
17 echo "into oneTimeSetUp."
22 echo "got to test case. sleeping for a bit..."
24 assertEquals "zero should be equal to 0" 0 $zero
26 echo "woke up. passed tautological test."
31 echo "into oneTimeTearDown."
34 # load and run shUnit2
35 source $SHUNIT_DIR/shunit2