| | @@ -47,10 +47,17 @@ |
| 47 | 47 | foreach f [lsort [glob $testdir/*.test]] { |
| 48 | 48 | set base [file root [file tail $f]] |
| 49 | 49 | lappend argv $base |
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | + |
| 53 | +set tempPath [expr {[info exists env(TEMP)] ? \ |
| 54 | + $env(TEMP) : [file dirname [info script]]}] |
| 55 | + |
| 56 | +if {$tcl_platform(platform) eq "windows"} then { |
| 57 | + set tempPath [string map [list \\ /] $tempPath] |
| 58 | +} |
| 52 | 59 | |
| 53 | 60 | # start protocol |
| 54 | 61 | # |
| 55 | 62 | proc protInit {cmd} { |
| 56 | 63 | if {$::PROT} { |
| | @@ -89,11 +96,11 @@ |
| 89 | 96 | set CODE $rc |
| 90 | 97 | if {$rc} {puts "ERROR: $result"} |
| 91 | 98 | set RESULT $result |
| 92 | 99 | } |
| 93 | 100 | |
| 94 | | -# Read a file into memory. |
| 101 | +# Read a file into memory. |
| 95 | 102 | # |
| 96 | 103 | proc read_file {filename} { |
| 97 | 104 | set in [open $filename r] |
| 98 | 105 | fconfigure $in -translation binary |
| 99 | 106 | set txt [read $in [file size $filename]] |
| | @@ -166,11 +173,17 @@ |
| 166 | 173 | test $name 1 |
| 167 | 174 | } else { |
| 168 | 175 | protOut " Expected:\n [join $expected "\n "]" |
| 169 | 176 | protOut " Got:\n [join $result "\n "]" |
| 170 | 177 | test $name 0 |
| 171 | | - } |
| 178 | + } |
| 179 | +} |
| 180 | + |
| 181 | +# Append all arguments into a single value and then returns it. |
| 182 | +# |
| 183 | +proc appendArgs {args} { |
| 184 | + eval append result $args |
| 172 | 185 | } |
| 173 | 186 | |
| 174 | 187 | # Perform a test |
| 175 | 188 | # |
| 176 | 189 | set test_count 0 |
| 177 | 190 | |