mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-08-04 02:06:29 -04:00
36 lines
699 B
Bash
Executable File
36 lines
699 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# A script to easily compare the output of old test results and new.
|
|
#
|
|
if [ "$1" == "" ]
|
|
then
|
|
echo "USAGE: testCheck.sh <test num>"
|
|
else
|
|
cmd="sh ./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
|
|
exit 1
|
|
fi
|
|
fi
|