aboutsummaryrefslogtreecommitdiff
path: root/lua/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lua/test.sh')
-rw-r--r--lua/test.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/lua/test.sh b/lua/test.sh
index 7fc515b..cedad08 100644
--- a/lua/test.sh
+++ b/lua/test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
[ -z "$VIS" ] && VIS="../../vis"
$VIS -v
@@ -10,7 +10,7 @@ export VIS_PATH=.
export VIS_THEME=theme
if [ $# -gt 0 ]; then
- test_files=$@
+ test_files=$*
else
test_files="$(find . -type f -name "*.in") basic_empty_file.in"
fi
@@ -19,25 +19,25 @@ for t in $test_files; do
TESTS_RUN=$((TESTS_RUN + 1))
t=${t%.in}
t=${t#./}
- $VIS $t.in
+ $VIS "$t".in
printf "%-30s" "$t"
- if [ -e $t.out ]; then
- if cmp -s $t.ref $t.out 2> /dev/null; then
+ if [ -e "$t".out ]; then
+ if cmp -s "$t".ref "$t".out 2> /dev/null; then
printf "PASS\n"
TESTS_OK=$((TESTS_OK + 1))
else
printf "FAIL\n"
- diff -u $t.ref $t.out > $t.err
+ diff -u "$t".ref "$t".out > "$t".err
fi
- elif [ -e $t.status ]; then
- if ! grep -v true $t.status > /dev/null; then
+ elif [ -e "$t".status ]; then
+ if ! grep -v true "$t".status > /dev/null; then
printf "PASS\n"
TESTS_OK=$((TESTS_OK + 1))
else
printf "FAIL\n"
- printf "$t\n" > $t.err
- grep -vn true $t.status >> $t.err
+ printf "%s\n" "$t" > "$t".err
+ grep -vn true "$t".status >> "$t".err
fi
else
printf "FAIL\n"