TCLAP/tests/simple-test.sh
Daniel Aarno 6db23c03b5 Break out some common test code to a separate file.
Next step to refactor remaining tests.
2018-07-30 18:03:45 +01:00

20 lines
267 B
Bash
Executable File

#!/bin/sh
if [ -z "$srcdir" ]; then
srcdir=`dirname $0`
fi
TEST_RESULT=$srcdir/$1
shift
../examples/"$@" 2>&1 | tee tmp.out
if cmp -s tmp.out $TEST_RESULT.out; then
echo "OK"
exit 0
else
echo "FAIL"
diff tmp.out $TEST_RESULT.out
exit 1
fi