diff options
author | Will Estes <westes575@gmail.com> | 2014-07-18 21:16:11 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:28 -0500 |
commit | f4ec87b6d926cfe635b480dbeec71b3b489dbb02 (patch) | |
tree | 3fade66a004ff0f861fa2bd3b2846bc0febd27ea /tests/testwrapper.sh | |
parent | 976cc15cf72c08521e4b575cad6900c109ca71b2 (diff) |
use unofficial bash strict mode and cleanups in supporting bash scripts
Diffstat (limited to 'tests/testwrapper.sh')
-rwxr-xr-x | tests/testwrapper.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/testwrapper.sh b/tests/testwrapper.sh index 014ee0a..30127b5 100755 --- a/tests/testwrapper.sh +++ b/tests/testwrapper.sh @@ -1,4 +1,5 @@ #!/bin/bash -vx +set -euo pipefail # testwrapper.sh: run a flex test, typically called by a Makefile @@ -8,6 +9,7 @@ INPUT_DIRECTORY="" INPUT_NAME="" INPUT_COUNT=0 USE_REDIRECT=0 +DO_COMPARISON=0 while getopts :d:i:rt1 OPTION ; do case $OPTION in @@ -30,7 +32,7 @@ TESTNAME="${!OPTIND}" INPUT_NAME=${INPUT_NAME:-`basename $TESTNAME`.txt} -if [ "$DO_COMPARISON" == "1" ] ; then +if [ "$DO_COMPARISON" -eq "1" ] ; then test `$TESTNAME 1 < $INPUT_DIRECTORY/$INPUT_NAME` -eq `$TESTNAME < $INPUT_DIRECTORY/$INPUT_NAME` exit $? fi |