1total=0 2pass=0 3fail=0 4w3m="../w3m 5-config 6/dev/null 7-o 8ignore_null_img_alt=false" 9for i in *.html; do 10 cmd="$w3m 11-I 12utf-8 13-O 14utf-8 15-T 16text/html" 17 opts="`basename "$i" .html`.opts" 18 test -f "$opts" && cmd="$cmd 19`grep -v '^#' $opts`" 20 if (set -x;IFS=' 21';$cmd) < "$i" | diff -u - "`basename "$i" .html`.expected"; then 22 pass="`expr 1 + "$pass"`" 23 else 24 fail="`expr 1 + "$fail"`" 25 fi 26 total="`expr 1 + "$total"`" 27done 28echo "TOTAL: $total test(s)" 29echo "PASS : $pass" 30echo "FAIL : $fail" 31test 0 -eq "$fail" 32