11 set env(CAFTEST_CAF) $pwd
15 log_file -a $tt/expect.log
18 w3m -config /dev/null -o cgi_bin=$pwd/tests file:///cgi-bin/wrap/Tsuffix
20 proc timeout-abort {} {
21 send_log "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
22 error "aborting due to timeout"
26 expect_after timeout timeout-abort
29 set m "[list expect [lindex $args end]]"
36 regsub -all { } $str {\W{0,3}\w?} str
44 epage {You need to log in}
46 proc fillformfield {value} {
50 proc submitform-expect {wanttxt} {
59 submitform-expect "wrong password"
64 submitform-expect "ACCESSGRANTED"
66 etxt {path = '/Tsuffix'}
69 submitform-expect "MAKING-worms"
72 submitform-expect "You have been logged out"
74 send "B\x10/Make sponges\r"
75 submitform-expect "You need to log in"
80 submitform-expect "ACCESSGRANTED"
83 submitform-expect "You have been logged out"
85 send "/Log in again\r"
86 submitform-expect "need to log in"
90 submitform-expect "ACCESSGRANTED"
92 send "BBB\x10/Make sponges\r"
93 submitform-expect "Login session interrupted"