Commit ac2961b8 ac2961b892ac58074ffe7478404c796d0db07117 by Sergey Poznyakoff

(default_mail_test): Ignore trailing whitespace

1 parent 8611d46b
......@@ -351,16 +351,31 @@ proc default_mail_test { args } {
set result 0
for {set i 0} {$i < [llength $pattern]} {incr i} {
verbose "i=$i, pat=[lindex ${pattern} $i]" 2
set pat [lindex ${pattern} $i]
regsub "\[ \t\]*$" [lindex ${pattern} $i] "" pat
verbose "i=$i, pat=$pat" 2
mail_expect $tmt {
-ex "$pat\r\n" {
-ex "$pat" {
if { $expect_out(buffer) != $expect_out(0,string) } {
verbose "Got \"$expect_out(buffer)\"" 2
verbose "instead of expected \"$pat\\r\\n\"" 2
set result 1
break
}
mail_expect $tmt {
-re "\[ \t]*\r\n" { }
default {
set result 1
break
}
timeout {
set result -2
break
}
eof {
set result -3
break
}
}
}
default {
set result 1
......