X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fshunit%2Fexample_shunit_test.sh;h=9d389bee41a93d6a5b013cd6a951e6ebfb4a4c0b;hb=6b3e90f782c845f3b6d4ea7e9607c2f98de9b8ef;hp=cc6c1bb3d2cdf6bfd7dbf645738398c7fc165653;hpb=eb678c70f95b76c4a5f1e286a7fe4d863180710a;p=feisty_meow.git diff --git a/scripts/shunit/example_shunit_test.sh b/scripts/shunit/example_shunit_test.sh index cc6c1bb3..9d389bee 100755 --- a/scripts/shunit/example_shunit_test.sh +++ b/scripts/shunit/example_shunit_test.sh @@ -3,6 +3,7 @@ # An example of using shunit2. # # Author: Chris Koeritz +# license gnu gpl v3 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. if [[ ! "$0" =~ ^/.* ]]; then @@ -19,11 +20,14 @@ oneTimeSetUp() testOneThing() { - echo "got to test case. sleeping for a bit..." + echo "got to primary test case." zero=0 assertEquals "zero should be equal to 0" 0 $zero - sleep 23 - echo "woke up. passed tautological test." + echo "passed tautological test." + sleep_time=83 + echo "$(date): now sleeping for $sleep_time seconds." + sleep $sleep_time + echo "$(date): woke up." } oneTimeTearDown()