summaryrefslogtreecommitdiff
path: root/tests/testwrapper.sh
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-12 18:26:15 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commit778b4742edaf8bc4907ebaee3bb87ec0a27cc200 (patch)
treefe14172c5249992bda870df72fbb7ecc9a3bca7b /tests/testwrapper.sh
parent9334bcbe4a0533ed7fa05d81488af623161d46fd (diff)
Check if test input file exists.
Not all tests have input files, so check if one exists and run the test program accordingly.
Diffstat (limited to 'tests/testwrapper.sh')
-rwxr-xr-xtests/testwrapper.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/testwrapper.sh b/tests/testwrapper.sh
index 7194e6d..f4ecff1 100755
--- a/tests/testwrapper.sh
+++ b/tests/testwrapper.sh
@@ -8,4 +8,8 @@ SRCDIR="$1"
TESTNAME="$2"
INPUTNAME=`basename $TESTNAME`.txt
-$TESTNAME < $SRCDIR/$INPUTNAME
+if [ -f $SRCDIR/$INPUTNAME ] ; then
+ $TESTNAME < $SRCDIR/$INPUTNAME
+else
+ $TESTNAME
+fi