diff options
author | Will Estes <westes575@gmail.com> | 2014-06-12 18:26:15 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:27 -0500 |
commit | 778b4742edaf8bc4907ebaee3bb87ec0a27cc200 (patch) | |
tree | fe14172c5249992bda870df72fbb7ecc9a3bca7b /tests | |
parent | 9334bcbe4a0533ed7fa05d81488af623161d46fd (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')
-rwxr-xr-x | tests/testwrapper.sh | 6 |
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 |