commit - 8bede388af99cee1b0b32c108ca4704548c0b790
commit + de2fa78d92447d2acc3d349b8044524f5b616f59
blob - f820628f8d1102bb7c1da297d3a24bffffe379b1
blob + 8ecf8abf659b85fdedb7f8b59b17a8bdf0af83ed
--- src/testsuite/tests.sh
+++ src/testsuite/tests.sh
echo "${name}: \"telnet\" not found."; exit 77
fi
+# prepare expect script
+e_in="${srcdir}/${test}.e"
+e_tmp="${test}.e_"
+e_exec="$e_in"
+if test -t 1 2>/dev/null; then
+ sed -e 's|^expect |puts -nonewline stderr "."; expect |g' \
+ "$e_in" >"$e_tmp"
+ [ $? -eq 0 ] && e_exec="$e_tmp"
+fi
+
echo_n "running ${test} ..."
-expect ${srcdir}/${test}.e > logs/${test}.log 2>&1; r=$?
+expect "$e_tmp" > logs/${test}.log; r=$?
[ $r -eq 0 ] && echo " ok." || echo " failure!"
+rm -f "$e_tmp"
exit $r
# -eof-