11 set env(CAFTEST_CAF) $pwd
15 log_file -a $tt/expect.log
21 w3m -config /dev/null -o cgi_bin=$pwd/tests file:///cgi-bin/wrap/Tsuffix
26 proc timeout-abort {} {
27 send_log "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
28 error "aborting due to timeout"
32 expect_after timeout timeout-abort
35 set m "[list expect [lindex $args end]]"
42 regsub -all { } $str {\W{0,3}\w?} str
50 epage {You need to log in}
52 proc fillformfield {value} {
56 proc submitform-expect {wanttxt} {
62 proc loginas {user {password sesame} {wanttxt ACCESSGRANTED}} {
64 fillformfield $password
66 submitform-expect $wanttxt
69 loginas alice bogus "wrong password"
73 etxt {path = '/Tsuffix'}
76 submitform-expect "MAKING-worms"
79 submitform-expect "You have been logged out"
81 send "B\x10/Make sponges\r"
82 submitform-expect "You need to log in"
87 submitform-expect "You have been logged out"
89 send "/Log in again\r"
90 submitform-expect "need to log in"
94 send "BBB\x10/Make sponges\r"
95 submitform-expect "Login session interrupted"