4 export PATH
="$(pwd)/../..:$PATH"
5 export LANG
="en_US.UTF-8"
6 [ -z "$VIS" ] && VIS
="../../vis"
9 if ! $VIS -v |
grep '+lua' >/dev
/null
2>&1; then
10 echo "vis compiled without lua support, skipping tests"
20 printf ':help\n:/ Lua paths/,$ w help\n:qall\n' |
$VIS 2> /dev
/null
&& cat help && rm -f help
21 test_files
="$(find . -type f -name '*.in')"
24 for t
in $test_files; do
25 TESTS_RUN
=$
((TESTS_RUN
+ 1))
28 $VIS '+qall!' "$t".
in < /dev
/null
2> /dev
/null
32 if [ $RETURN_CODE -eq 0 -a -e "$t".out
]; then
33 if cmp -s "$t".ref
"$t".out
2> /dev
/null
; then
35 TESTS_OK
=$
((TESTS_OK
+ 1))
38 diff -u "$t".ref
"$t".out
> "$t".err
45 printf "Tests ok %d/%d\n" $TESTS_OK $TESTS_RUN
48 [ $TESTS_OK -eq $TESTS_RUN ]