mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 20:33:39 -04:00
a script to compare test output
This commit is contained in:
parent
46328568c4
commit
c8a950af5b
34
tests/testCheck.sh
Executable file
34
tests/testCheck.sh
Executable file
@ -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 <test num>"
|
||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user