box-o-sand/lcthw-remnants/test.sh
Dan Buch f2380eef05 Add 'lcthw-remnants/' from commit 'e172f73c8297b22a579c94558f0c171ca74a0e5c'
git-subtree-dir: lcthw-remnants
git-subtree-mainline: 4107485591
git-subtree-split: e172f73c82
2013-01-09 23:42:19 -05:00

36 lines
532 B
Bash

EXIT_CODE=0
ASSERT_COUNT=0
function assert_equal(){
if [[ $1 == $2 ]] ; then
echo -n "."
else
echo -n "F"
EXIT_CODE=1
fi
ASSERT_COUNT=$(expr $ASSERT_COUNT + 1)
}
function assert_not_equal(){
if [[ $1 != $2 ]] ; then
echo -n "."
else
echo -n "F"
EXIT_CODE=1
fi
ASSERT_COUNT=$(expr $ASSERT_COUNT + 1)
}
function test_finish(){
echo
if [ $EXIT_CODE -eq 0 ]; then
echo "PASS"
else
echo "FAIL"
fi
exit $EXIT_CODE
}