3 # Copyright (C) 2004-2024 René Rebe, ExactCODE GmbH; Germany.
14 if [ "$1" = -v ]; then
19 if [ "$1" = -t ]; then
25 tmp
=`mktemp || mktemp -t tmp.XXXXXXXXXX`
28 [ "$1" ] ||
set -- *.cmd
30 [ "$verbose" -gt 1 ] && tee="tee /dev/tty"
34 printf "Running test $x ..."
35 /bin
/bash
$PWD/$x.cmd
2>&1 |
$tee > $tmp
36 error
=${PIPESTATUS[0]}
38 if [ $error = 42 ]; then
40 elif [ $error = 43 ]; then
42 elif [ ! -f $x.out
-a $error != 0 ]; then
43 echo " Failed (as expected)"
44 elif [ ! -f $x.out
]; then
45 echo " Passed (unexpected)"
48 elif [ $error = 0 ] && grep -q "==NO-DIFF==" $x.out
; then
50 elif cmp $tmp $x.out
2>&1 >/dev
/null
; then
54 [ $verbose -gt 0 ] && diff -ua $x.out
$tmp
59 if [ $errors -ne 0 ]; then
60 echo -e "\n\t$errors error(s) total!\n"
61 [ $time -ne 0 ] && echo "(timing supressed due to errors)"
62 elif [ $time -ne 0 ]; then
64 time for x
in *.cmd
; do