/[mailutils]/mailutils/testsuite/lib/mailutils.exp
ViewVC logotype

Diff of /mailutils/testsuite/lib/mailutils.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gray, Mon Nov 4 17:36:15 2002 UTC revision 1.11 by gray, Tue Nov 19 13:57:11 2002 UTC
# Line 152  proc mu_exec {args} { Line 152  proc mu_exec {args} {
152      for {set i 0} {$i < [llength $args]} {incr i} {      for {set i 0} {$i < [llength $args]} {incr i} {
153          set opt [lindex $args $i]          set opt [lindex $args $i]
154          if {"$opt" == "-retcode"} {          if {"$opt" == "-retcode"} {
             set retcode [lindex $args [expr $i + 1]]  
155              incr i              incr i
156                set retcode [lindex $args $i]
157                verbose "RETCODE $retcode" 1
158          } elseif {"$opt" == "-message"} {          } elseif {"$opt" == "-message"} {
159              set message [lindex $args [expr $i + 1]]              set message [lindex $args [expr $i + 1]]
160              incr i              incr i
# Line 197  proc mu_exec {args} { Line 198  proc mu_exec {args} {
198    
199      set res [remote_exec host $cmd]      set res [remote_exec host $cmd]
200    
201      set args [concat $args "$retcode"]      lappend args "$retcode"
202                            
203      set output [lindex $res 1]      set output [lindex $res 1]
204    
# Line 226  proc mu_exec {args} { Line 227  proc mu_exec {args} {
227    
228          if {$regexp} {          if {$regexp} {
229              verbose "does \"$output\" match regular expression \"$pattern\"?" 1              verbose "does \"$output\" match regular expression \"$pattern\"?" 1
230              if {![regexp -- "$pattern(.*)" "$output" dummy output]} {              if {![regexp -- "${pattern}(.*)" "$output" dummy output]} {
231                  set result 1                  set result 1
232              }              }
233          } else {          } else {
# Line 237  proc mu_exec {args} { Line 238  proc mu_exec {args} {
238                  }                  }
239                  set output [string range $output [string length $pattern] end]                  set output [string range $output [string length $pattern] end]
240              }              }
241              if {![regexp -- "\[ \t]*\r\n(.*)" "$output" dummy output]} {          }
242                  set result 1  
243              }          if {![regexp -- "\[ \t]*\r\n(.*)" "$output" dummy output]} {
244                set result 1
245          }          }
246    
247          if {$result} {          if {$result} {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26