X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=stest%2Fcommon.tcl;h=8897bd90da340a99b4529b65e736691673c7cbb9;hb=5f9e3ffe07bd4412e35e90637694a3e5bc2eac7a;hp=a85239ca1a643b2834120ffe3ac33e3aca87010d;hpb=7f12e156476f9daf7f57af3a9b76ad88c56ff5b6;p=secnet.git diff --git a/stest/common.tcl b/stest/common.tcl index a85239c..8897bd9 100644 --- a/stest/common.tcl +++ b/stest/common.tcl @@ -177,7 +177,7 @@ proc spawn-secnet {location site} { } set argl [list $secnet -dvnc $cf] set divertk SECNET_STEST_DIVERT_$site - puts -nonewline "spawn" + puts "spawn:" foreach k [array names env] { switch -glob $k { SECNET_STEST_DIVERT_* - @@ -188,8 +188,9 @@ proc spawn-secnet {location site} { } if {[info exists env($divertk)]} { switch -glob $env($divertk) { - i { - puts " $argl" + i - {i *} { + regsub {^i} $env($divertk) {} divert_prefix + puts "$divert_prefix $argl" puts -nonewline "run ^ command, hit return " flush stdout gets stdin @@ -198,9 +199,13 @@ proc spawn-secnet {location site} { 0 - "" { puts " $argl" } - * { + /* - ./* { puts " $argl" set argl [split $env($divertk)] + puts "... $argl" + } + * { + error "$divertk not understood" } } }