summaryrefslogtreecommitdiff
path: root/tests/testwrapper-direct.sh
diff options
context:
space:
mode:
authorDaniel Brooks <db48x@db48x.net>2020-10-21 17:08:22 -0400
committerEric S. Raymond <esr@thyrsus.com>2020-10-21 17:08:22 -0400
commit8be9597d7d27b0db9f51922cbd9d3a87965b4445 (patch)
treead2ecd3869f32e359c433d7807daf05d709a7799 /tests/testwrapper-direct.sh
parent1726f1ca2dd92daa3c845034c8375171c867b85a (diff)
downloadflex-git-8be9597d7d27b0db9f51922cbd9d3a87965b4445.tar.gz
Use shellcheck on most of the shell scripts in the repository.
And add a "lint" target that runs shellcheck on them.
Diffstat (limited to 'tests/testwrapper-direct.sh')
-rwxr-xr-xtests/testwrapper-direct.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/testwrapper-direct.sh b/tests/testwrapper-direct.sh
index 9160501..53d59a0 100755
--- a/tests/testwrapper-direct.sh
+++ b/tests/testwrapper-direct.sh
@@ -9,12 +9,15 @@ while getopts :b:s: OPTION ; do
case $OPTION in
b) BINARY_DIR=$OPTARG ;;
s) SOURCE_DIR=$OPTARG ;;
+ *) echo "Usage: ${0} [-b BINARY_DIR] [-s SOURCE_DIR] TESTNAME"
+ exit 1
+ ;;
esac
done
-shift $(($OPTIND-1))
+shift $((OPTIND-1))
TESTNAME=$1
-INPUT_NAME=`basename "${TESTNAME%.exe}"`.txt
+INPUT_NAME=$(basename "${TESTNAME%.exe}").txt
-cd ${SOURCE_DIR} && ${BINARY_DIR}/${TESTNAME} ${INPUT_NAME}
+cd "${SOURCE_DIR}" && "${BINARY_DIR}/${TESTNAME}" "${INPUT_NAME}"