6 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
9 # this needs to be relative to where the test will actually reside; the ../../../../../etc
10 # should get to the top of the tools and tests hierarchy.
11 source "../prepare_tools.sh" "../prepare_tools.sh"
12 if [ -z "$TEST_TEMP" ]; then
13 echo The TestKit could not be automatically located.
17 if [ -z "$TESTKIT_SENTINEL" ]; then echo Please run prepare_tools.sh before testing.; exit 3; fi
18 source "$TESTKIT_ROOT/library/establish_environment.sh"
22 # a test environment initializer method called directly by shunit.
23 # you can add your own code here that is needed before the test run starts.
27 # this exact test should always be the first one in a test suite.
30 # make sure the test environment is good.
32 assertEquals "sanity test" 0 $?
35 testCleaningPriorTestRun()
37 # take steps to clean last test, if any are needed.
44 assertEquals "doing that thing should work" 0 $?
49 echo doing another thing here
50 assertEquals "doing that other thing should work" 0 $?
52 echo "about to cause a failure, to test assertNotEquals..."
54 assertNotEquals "an explicit failure should be seen" 0 $?
58 # cleaning up after test, if needed.
62 # load and run shUnit2
63 source "$SHUNIT_DIR/shunit2"