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