diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-19 13:57:11 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-19 13:57:11 +0000 |
commit | 42d4fece15cdb99a7952a1889ebbe2628a518639 (patch) | |
tree | 947b6d1142f4f6842a5921b6a0e3bfa1d1e0230c /testsuite | |
parent | ba257933a57e0cdb890c0cb2baab816030a5b065 (diff) | |
download | mailutils-42d4fece15cdb99a7952a1889ebbe2628a518639.tar.gz mailutils-42d4fece15cdb99a7952a1889ebbe2628a518639.tar.bz2 |
Bugfix: always check for newline after matched pattern.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/lib/mailutils.exp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/testsuite/lib/mailutils.exp b/testsuite/lib/mailutils.exp index 16a255954..664ee86c9 100644 --- a/testsuite/lib/mailutils.exp +++ b/testsuite/lib/mailutils.exp @@ -152,8 +152,9 @@ proc mu_exec {args} { for {set i 0} {$i < [llength $args]} {incr i} { set opt [lindex $args $i] if {"$opt" == "-retcode"} { - set retcode [lindex $args [expr $i + 1]] incr i + set retcode [lindex $args $i] + verbose "RETCODE $retcode" 1 } elseif {"$opt" == "-message"} { set message [lindex $args [expr $i + 1]] incr i @@ -197,7 +198,7 @@ proc mu_exec {args} { set res [remote_exec host $cmd] - set args [concat $args "$retcode"] + lappend args "$retcode" set output [lindex $res 1] @@ -226,7 +227,7 @@ proc mu_exec {args} { if {$regexp} { verbose "does \"$output\" match regular expression \"$pattern\"?" 1 - if {![regexp -- "$pattern(.*)" "$output" dummy output]} { + if {![regexp -- "${pattern}(.*)" "$output" dummy output]} { set result 1 } } else { @@ -237,9 +238,10 @@ proc mu_exec {args} { } set output [string range $output [string length $pattern] end] } - if {![regexp -- "\[ \t]*\r\n(.*)" "$output" dummy output]} { - set result 1 - } + } + + if {![regexp -- "\[ \t]*\r\n(.*)" "$output" dummy output]} { + set result 1 } if {$result} { |