From a2d1d2c00b41c075fd61c899c8884c2012817343 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 29 Oct 2015 01:57:00 +0000 Subject: [PATCH] Testing: Move expect_before timeout to right place Otherwise it relates to the default spawn id which is stdin. The effect is that (a) the timeout is for the whole script, not each expect, and (b) when stdin is /dev/null Tcl gets EOF, closes it, and then complains error writing "stdout": bad file number (which is rather daft). Signed-off-by: Ian Jackson --- tests/autotest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/autotest b/tests/autotest index f2b2870..60ef3ff 100755 --- a/tests/autotest +++ b/tests/autotest @@ -31,9 +31,7 @@ proc timeout-abort {} { send_log "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" error "aborting due to timeout" } -set timeout 15 - -expect_after timeout timeout-abort +set timeout 10 proc elog {args} { set m "[list expect [lindex $args end]]" @@ -57,6 +55,8 @@ proc dospawn {} { spawn -nottycopy \ w3m -config /dev/null -o cgi_bin=$pwd/tests file:///cgi-bin/wrap/Tsuffix + expect_after timeout timeout-abort + epage {You need to log in} } -- 2.30.2