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} {
56 proc loginas {user {password sesame} {wanttxt ACCESSGRANTED}} {
58 fillformfield $password
60 submitform-expect $wanttxt
63 loginas alice bogus "wrong password"
67 etxt {path = '/Tsuffix'}
70 submitform-expect "MAKING-worms"
73 submitform-expect "You have been logged out"
75 send "B\x10/Make sponges\r"
76 submitform-expect "You need to log in"
81 submitform-expect "You have been logged out"
83 send "/Log in again\r"
84 submitform-expect "need to log in"
88 send "BBB\x10/Make sponges\r"
89 submitform-expect "Login session interrupted"