summaryrefslogtreecommitdiff
path: root/tests/testwrapper.sh
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-07-01 20:49:53 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:28 -0500
commit7442349daba3dc8f427f6f5c17f9651af930a2a8 (patch)
treea66d91c938aead799031265b8adfc53d1c6aadd1 /tests/testwrapper.sh
parent0c28dcc469e132744cf3ae153aa9fa5efff3e0d1 (diff)
refactor lineno_nr test for new test suite layout
Diffstat (limited to 'tests/testwrapper.sh')
-rwxr-xr-xtests/testwrapper.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/testwrapper.sh b/tests/testwrapper.sh
index 2d0b7b7..014ee0a 100755
--- a/tests/testwrapper.sh
+++ b/tests/testwrapper.sh
@@ -9,7 +9,7 @@ INPUT_NAME=""
INPUT_COUNT=0
USE_REDIRECT=0
-while getopts :d:i:rt OPTION ; do
+while getopts :d:i:rt1 OPTION ; do
case $OPTION in
d) INPUT_DIRECTORY=$OPTARG ;;
i)
@@ -22,6 +22,7 @@ while getopts :d:i:rt OPTION ; do
;;
r) USE_REDIRECT=1 ;;
t) USE_TABLES=1 ;;
+ 1) DO_COMPARISON=1 ;;
esac
done
@@ -29,6 +30,11 @@ TESTNAME="${!OPTIND}"
INPUT_NAME=${INPUT_NAME:-`basename $TESTNAME`.txt}
+if [ "$DO_COMPARISON" == "1" ] ; then
+ test `$TESTNAME 1 < $INPUT_DIRECTORY/$INPUT_NAME` -eq `$TESTNAME < $INPUT_DIRECTORY/$INPUT_NAME`
+ exit $?
+ fi
+
if [ $INPUT_COUNT -gt 1 ] ; then
$TESTNAME ${USE_TABLES:+${INPUT_DIRECTORY}/${TESTNAME}.tables} ${INPUT_NAME}
exit $?