f2380eef05
git-subtree-dir: lcthw-remnants git-subtree-mainline:4107485591
git-subtree-split:e172f73c82
36 lines
532 B
Bash
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
|
|
}
|