f499bf95b5cad4e9f99840b17feac703a2838121
[feisty_meow.git] / scripts / shunit / example_shunit_test.sh
1 #!/bin/bash
2
3 # An example of using shunit2.
4 #
5 # Author: Chris Koeritz
6
7 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
8 cd $WORKDIR
9
10 # this variable needs to be set somewhere.  feisty meow scripts will set it.
11 #SHUNIT_DIR=/home/fred/shunit
12
13 oneTimeSetUp()
14 {
15   echo into set up.
16 }
17
18 testOneThing()
19 {
20   echo got to test case.
21   zero=0
22   assertEquals "zero should be equal to 0" 0 $zero
23   sleep 23
24 }
25
26 oneTimeTearDown()
27 {
28   echo into tear down.
29 }
30
31 # load and run shUnit2
32 source $SHUNIT_DIR/shunit2
33