diff --git a/tests/testCheck.sh b/tests/testCheck.sh new file mode 100755 index 0000000..ef583e0 --- /dev/null +++ b/tests/testCheck.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# +# A script to easily compare the output of old test results and new. +# +if [ "$1" == "" ] +then + echo "USAGE: testCheck.sh " +else + cmd="test$1.sh" + out="test$1.out" + $cmd + if cmp -s tmp.out $out + then + echo "$cmd OK -- output identical" + else + echo "$cmd Problem!" + echo + echo "TEST ======================================================" + echo + cat tmp.out + echo "EXPECTED ==================================================" + echo + cat $out + echo + echo "DIFF ======================================================" + echo "diff tmp.out $out" + echo "< = test(new) = tmp.out" + echo "> = expected = $out" + echo + diff tmp.out $out + echo + fi +fi