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