switch -glob -- $testfile {
tests/*.at {
- regsub {^tests/} $testfile {tests/tmp/} tt
- regsub {\.at$} $tt {} tt
+ regsub {^tests/} $testfile {} id
+ regsub {\.at$} $id {} id
+ set tt "tests/tmp/$id"
}
* {
+ set id "\[[info pid]\]"
set tt tests/tmp/[info pid]
}
}
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"
+ error "$id: aborting due to timeout"
}
-set timeout 15
-
-expect_after timeout timeout-abort
+set timeout 10
proc elog {args} {
+ global id
set m "[list expect [lindex $args end]]"
- puts stderr $m
+ puts stderr "$id: $m"
# send_log "\n$m\n"
eval expect $args
}
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}
}
source $testfile
-puts ok
+puts "$id: ok"