4 [ -z "$VIS" ] && VIS
="../../vis"
7 if ! $VIS -v |
grep '+lua' >/dev
/null
2>&1; then
8 echo "vis compiled without lua support, skipping tests"
12 type busted
>/dev
/null
2>&1 ||
{
13 echo "busted(1) not found, skipping tests"
23 test_files
="$(find . -type f -name '*.lua' -a ! -name visrc.lua)"
26 for t
in $test_files; do
27 TESTS_RUN
=$
((TESTS_RUN
+ 1))
31 $VIS "$t.in" < /dev
/null
2> /dev
/null
> "$t.busted"
37 TESTS_OK
=$
((TESTS_OK
+ 1))
42 printf "Tests ok %d/%d\n" $TESTS_OK $TESTS_RUN
45 [ $TESTS_OK -eq $TESTS_RUN ]