8 diffcmd='diff --unchanged-line-format= --old-line-format=<%L --new-line-format=>%L'
14 -G) regenerate=1 && shift;;
15 -*) echo "Usage: $0 [-G] [<files>...]"; exit 64;;
19 for candidate in ${@:-t*.in}
21 test_count=$((test_count+1))
22 file="${candidate%.in}"
23 test -r "$file.in" || continue
25 name="$(echo ${file#*-} | tr _ \ )"
27 case "$name" in *\ -*) cmd="$cmd -${name#* -}";; esac
29 if test -n "$regenerate"
33 echo "ok $test_count # skip $file.out"
38 if test -e $file.sh; then $cmd 2>&1 | ./$file.sh; fi &&
39 if test -e $file.out; then $cmd 2>&1 | $diffcmd "$file.out" -; fi
42 test 0 = $? || printf 'not '
43 echo "ok $test_count - $name"