os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/winPipe.test
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/winPipe.test Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,449 @@
1.4 +#
1.5 +# winPipe.test --
1.6 +#
1.7 +# This file contains a collection of tests for tclWinPipe.c
1.8 +#
1.9 +# Sourcing this file into Tcl runs the tests and generates output for
1.10 +# errors. No output means no errors were found.
1.11 +#
1.12 +# Copyright (c) 1996 Sun Microsystems, Inc.
1.13 +# Copyright (c) 1998-1999 by Scriptics Corporation.
1.14 +#
1.15 +# See the file "license.terms" for information on usage and redistribution
1.16 +# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1.17 +#
1.18 +# RCS: @(#) $Id: winPipe.test,v 1.22.2.4 2005/04/20 00:14:54 hobbs Exp $
1.19 +
1.20 +package require tcltest
1.21 +namespace import -force ::tcltest::*
1.22 +unset -nocomplain path
1.23 +
1.24 +testConstraint exec [llength [info commands exec]]
1.25 +
1.26 +set bindir [file join [pwd] [file dirname [info nameofexecutable]]]
1.27 +set cat32 [file join $bindir cat32.exe]
1.28 +
1.29 +set ::tcltest::testConstraints(cat32) [file exists $cat32]
1.30 +
1.31 +if {[catch {puts console1 ""}]} {
1.32 + set ::tcltest::testConstraints(AllocConsole) 1
1.33 +} else {
1.34 + set ::tcltest::testConstraints(.console) 1
1.35 +}
1.36 +
1.37 +set big bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n
1.38 +append big $big
1.39 +append big $big
1.40 +append big $big
1.41 +append big $big
1.42 +append big $big
1.43 +append big $big
1.44 +
1.45 +set path(little) [makeFile {} little]
1.46 +set f [open $path(little) w]
1.47 +puts -nonewline $f "little"
1.48 +close $f
1.49 +
1.50 +set path(big) [makeFile {} big]
1.51 +set f [open $path(big) w]
1.52 +puts -nonewline $f $big
1.53 +close $f
1.54 +
1.55 +proc contents {file} {
1.56 + set f [open $file r]
1.57 + set r [read $f]
1.58 + close $f
1.59 + set r
1.60 +}
1.61 +
1.62 +set path(more) [makeFile {
1.63 + while {[eof stdin] == 0} {
1.64 + puts -nonewline [read stdin]
1.65 + }
1.66 +} more]
1.67 +
1.68 +set path(stdout) [makeFile {} stdout]
1.69 +set path(stderr) [makeFile {} stderr]
1.70 +
1.71 +test winpipe-1.1 {32 bit comprehensive tests: from little file} {pcOnly exec cat32} {
1.72 + exec $cat32 < $path(little) > $path(stdout) 2> $path(stderr)
1.73 + list [contents $path(stdout)] [contents $path(stderr)]
1.74 +} {little stderr32}
1.75 +test winpipe-1.2 {32 bit comprehensive tests: from big file} {pcOnly exec cat32} {
1.76 + exec $cat32 < $path(big) > $path(stdout) 2> $path(stderr)
1.77 + list [contents $path(stdout)] [contents $path(stderr)]
1.78 +} "{$big} stderr32"
1.79 +test winpipe-1.3 {32 bit comprehensive tests: a little from pipe} {pcOnly nt exec cat32} {
1.80 + exec [interpreter] more < little | $cat32 > $path(stdout) 2> $path(stderr)
1.81 + list [contents $path(stdout)] [contents $path(stderr)]
1.82 +} {little stderr32}
1.83 +test winpipe-1.4 {32 bit comprehensive tests: a lot from pipe} {pcOnly nt exec cat32} {
1.84 + exec [interpreter] more < big | $cat32 > $path(stdout) 2> $path(stderr)
1.85 + list [contents $path(stdout)] [contents $path(stderr)]
1.86 +} "{$big} stderr32"
1.87 +test winpipe-1.5 {32 bit comprehensive tests: a lot from pipe} {pcOnly 95 exec cat32} {
1.88 + exec command /c type big |& $cat32 > $path(stdout) 2> $path(stderr)
1.89 + list [contents $path(stdout)] [contents $path(stderr)]
1.90 +} "{$big} stderr32"
1.91 +test winpipe-1.6 {32 bit comprehensive tests: from console} \
1.92 + {pcOnly cat32 AllocConsole} {
1.93 + # would block waiting for human input
1.94 +} {}
1.95 +test winpipe-1.7 {32 bit comprehensive tests: from NUL} {pcOnly exec cat32} {
1.96 + exec $cat32 < nul > $path(stdout) 2> $path(stderr)
1.97 + list [contents $path(stdout)] [contents $path(stderr)]
1.98 +} {{} stderr32}
1.99 +test winpipe-1.8 {32 bit comprehensive tests: from socket} {pcOnly cat32} {
1.100 + # doesn't work
1.101 +} {}
1.102 +test winpipe-1.9 {32 bit comprehensive tests: from nowhere} \
1.103 + {pcOnly exec cat32 .console} {
1.104 + exec $cat32 > $path(stdout) 2> $path(stderr)
1.105 + list [contents $path(stdout)] [contents $path(stderr)]
1.106 +} {{} stderr32}
1.107 +test winpipe-1.10 {32 bit comprehensive tests: from file handle} \
1.108 + {pcOnly exec cat32} {
1.109 + set f [open $path(little) r]
1.110 + exec $cat32 <@$f > $path(stdout) 2> $path(stderr)
1.111 + close $f
1.112 + list [contents $path(stdout)] [contents $path(stderr)]
1.113 +} {little stderr32}
1.114 +test winpipe-1.11 {32 bit comprehensive tests: read from application} \
1.115 + {pcOnly exec cat32} {
1.116 + set f [open "|[list $cat32] < $path(little)" r]
1.117 + gets $f line
1.118 + catch {close $f} msg
1.119 + list $line $msg
1.120 +} {little stderr32}
1.121 +test winpipe-1.12 {32 bit comprehensive tests: a little to file} \
1.122 + {pcOnly exec cat32} {
1.123 + exec $cat32 < $path(little) > $path(stdout) 2> $path(stderr)
1.124 + list [contents $path(stdout)] [contents $path(stderr)]
1.125 +} {little stderr32}
1.126 +test winpipe-1.13 {32 bit comprehensive tests: a lot to file} \
1.127 + {pcOnly exec cat32} {
1.128 + exec $cat32 < $path(big) > $path(stdout) 2> $path(stderr)
1.129 + list [contents $path(stdout)] [contents $path(stderr)]
1.130 +} "{$big} stderr32"
1.131 +test winpipe-1.14 {32 bit comprehensive tests: a little to pipe} \
1.132 + {pcOnly exec stdio cat32} {
1.133 + exec $cat32 < $path(little) | [interpreter] $path(more) > $path(stdout) 2> $path(stderr)
1.134 + list [contents $path(stdout)] [contents $path(stderr)]
1.135 +} {little stderr32}
1.136 +test winpipe-1.15 {32 bit comprehensive tests: a lot to pipe} \
1.137 + {pcOnly exec stdio cat32} {
1.138 + exec $cat32 < $path(big) | [interpreter] $path(more) > $path(stdout) 2> $path(stderr)
1.139 + list [contents $path(stdout)] [contents $path(stderr)]
1.140 +} "{$big} stderr32"
1.141 +test winpipe-1.16 {32 bit comprehensive tests: to console} {pcOnly exec cat32} {
1.142 + catch {exec $cat32 << "You should see this\n" >@stdout} msg
1.143 + set msg
1.144 +} stderr32
1.145 +test winpipe-1.17 {32 bit comprehensive tests: to NUL} {pcOnly exec cat32} {
1.146 + # some apps hang when sending a large amount to NUL. $cat32 isn't one.
1.147 + catch {exec $cat32 < $path(big) > nul} msg
1.148 + set msg
1.149 +} stderr32
1.150 +test winpipe-1.18 {32 bit comprehensive tests: to nowhere} \
1.151 + {pcOnly exec cat32 .console} {
1.152 + exec $cat32 < $path(big) >&@stdout
1.153 +} {}
1.154 +test winpipe-1.19 {32 bit comprehensive tests: to file handle} {pcOnly exec cat32} {
1.155 + set f1 [open $path(stdout) w]
1.156 + set f2 [open $path(stderr) w]
1.157 + exec $cat32 < $path(little) >@$f1 2>@$f2
1.158 + close $f1
1.159 + close $f2
1.160 + list [contents $path(stdout)] [contents $path(stderr)]
1.161 +} {little stderr32}
1.162 +test winpipe-1.20 {32 bit comprehensive tests: write to application} \
1.163 + {pcOnly exec cat32} {
1.164 + set f [open |[list $cat32 >$path(stdout)] w]
1.165 + puts -nonewline $f "foo"
1.166 + catch {close $f} msg
1.167 + list [contents $path(stdout)] $msg
1.168 +} {foo stderr32}
1.169 +test winpipe-1.21 {32 bit comprehensive tests: read/write application} \
1.170 + {pcOnly exec cat32} {
1.171 + set f [open "|[list $cat32]" r+]
1.172 + puts $f $big
1.173 + puts $f \032
1.174 + flush $f
1.175 + set r [read $f 64]
1.176 + catch {close $f}
1.177 + set r
1.178 +} "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
1.179 +test winpipe-1.22 {Checking command.com for Win95/98 hanging} {pcOnly 95 exec} {
1.180 + exec command.com /c dir /b
1.181 + set result 1
1.182 +} 1
1.183 +file delete more
1.184 +
1.185 +test winpipe-4.1 {Tcl_WaitPid} {pcOnly nt exec cat32} {
1.186 + proc readResults {f} {
1.187 + global x result
1.188 + if { [eof $f] } {
1.189 + close $f
1.190 + set x 1
1.191 + } else {
1.192 + set line [read $f ]
1.193 + set result "$result$line"
1.194 + }
1.195 + }
1.196 +
1.197 + set f [open "|[list $cat32] < big 2> $path(stderr)" r]
1.198 + fconfigure $f -buffering none -blocking 0
1.199 + fileevent $f readable "readResults $f"
1.200 + set x 0
1.201 + set result ""
1.202 + vwait x
1.203 + list $result $x [contents $path(stderr)]
1.204 +} "{$big} 1 stderr32"
1.205 +test winpipe-4.2 {Tcl_WaitPid: return of exception codes, SIGFPE} {pcOnly exec} {
1.206 + set f [open "|[tcltest::interpreter]" w+]
1.207 + set pid [pid $f]
1.208 + puts $f "testexcept float_underflow"
1.209 + set status [catch {close $f}]
1.210 + list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2]
1.211 +} {1 1 SIGFPE}
1.212 +test winpipe-4.3 {Tcl_WaitPid: return of exception codes, SIGSEGV} {pcOnly exec} {
1.213 + set f [open "|[tcltest::interpreter]" w+]
1.214 + set pid [pid $f]
1.215 + puts $f "testexcept access_violation"
1.216 + set status [catch {close $f}]
1.217 + list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2]
1.218 +} {1 1 SIGSEGV}
1.219 +test winpipe-4.4 {Tcl_WaitPid: return of exception codes, SIGILL} {pcOnly exec} {
1.220 + set f [open "|[tcltest::interpreter]" w+]
1.221 + set pid [pid $f]
1.222 + puts $f "testexcept illegal_instruction"
1.223 + set status [catch {close $f}]
1.224 + list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2]
1.225 +} {1 1 SIGILL}
1.226 +test winpipe-4.5 {Tcl_WaitPid: return of exception codes, SIGINT} {pcOnly exec} {
1.227 + set f [open "|[tcltest::interpreter]" w+]
1.228 + set pid [pid $f]
1.229 + puts $f "testexcept ctrl+c"
1.230 + set status [catch {close $f}]
1.231 + list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2]
1.232 +} {1 1 SIGINT}
1.233 +
1.234 +set path(nothing) [makeFile {} nothing]
1.235 +close [open $path(nothing) w]
1.236 +
1.237 +catch {set env_tmp $env(TMP)}
1.238 +catch {set env_temp $env(TEMP)}
1.239 +
1.240 +set env(TMP) c:/
1.241 +set env(TEMP) c:/
1.242 +
1.243 +test winpipe-5.1 {TclpCreateTempFile: cleanup temp files} {pcOnly exec} {
1.244 + set x {}
1.245 + set existing [glob -nocomplain c:/tcl*.tmp]
1.246 + exec [interpreter] < nothing
1.247 + foreach p [glob -nocomplain c:/tcl*.tmp] {
1.248 + if {[lsearch $existing $p] == -1} {
1.249 + lappend x $p
1.250 + }
1.251 + }
1.252 + set x
1.253 +} {}
1.254 +test winpipe-5.2 {TclpCreateTempFile: TMP and TEMP not defined} {pcOnly exec} {
1.255 + set tmp $env(TMP)
1.256 + set temp $env(TEMP)
1.257 + unset env(TMP)
1.258 + unset env(TEMP)
1.259 + exec [interpreter] < nothing
1.260 + set env(TMP) $tmp
1.261 + set env(TEMP) $temp
1.262 + set x {}
1.263 +} {}
1.264 +test winpipe-5.3 {TclpCreateTempFile: TMP specifies non-existent directory} \
1.265 + {pcOnly exec } {
1.266 + set tmp $env(TMP)
1.267 + set env(TMP) snarky
1.268 + exec [interpreter] < nothing
1.269 + set env(TMP) $tmp
1.270 + set x {}
1.271 +} {}
1.272 +test winpipe-5.4 {TclpCreateTempFile: TEMP specifies non-existent directory} \
1.273 + {pcOnly exec} {
1.274 + set tmp $env(TMP)
1.275 + set temp $env(TEMP)
1.276 + unset env(TMP)
1.277 + set env(TEMP) snarky
1.278 + exec [interpreter] < nothing
1.279 + set env(TMP) $tmp
1.280 + set env(TEMP) $temp
1.281 + set x {}
1.282 +} {}
1.283 +
1.284 +test winpipe-6.1 {PipeSetupProc & PipeCheckProc: read threads} \
1.285 + {pcOnly exec cat32} {
1.286 + set f [open "|[list $cat32]" r+]
1.287 + fconfigure $f -blocking 0
1.288 + fileevent $f writable { set x writable }
1.289 + set x {}
1.290 + vwait x
1.291 + fileevent $f writable {}
1.292 + fileevent $f readable { lappend x readable }
1.293 + after 100 { lappend x timeout }
1.294 + vwait x
1.295 + puts $f foobar
1.296 + flush $f
1.297 + vwait x
1.298 + lappend x [read $f]
1.299 + after 100 { lappend x timeout }
1.300 + vwait x
1.301 + fconfigure $f -blocking 1
1.302 + lappend x [catch {close $f} msg] $msg
1.303 +} {writable timeout readable {foobar
1.304 +} timeout 1 stderr32}
1.305 +test winpipe-6.2 {PipeSetupProc & PipeCheckProc: write threads} \
1.306 + {pcOnly exec cat32} {
1.307 + set f [open "|[list $cat32]" r+]
1.308 + fconfigure $f -blocking 0
1.309 + fileevent $f writable { set x writable }
1.310 + set x {}
1.311 + vwait x
1.312 + puts -nonewline $f $big$big$big$big
1.313 + flush $f
1.314 + after 100 { lappend x timeout }
1.315 + vwait x
1.316 + lappend x [catch {close $f} msg] $msg
1.317 +} {writable timeout 0 {}}
1.318 +
1.319 +set path(echoArgs.tcl) [makeFile {
1.320 + puts "[list $argv0 $argv]"
1.321 +} echoArgs.tcl]
1.322 +
1.323 +### validate the raw output of BuildCommandLine().
1.324 +###
1.325 +test winpipe-7.1 {BuildCommandLine: null arguments} {pcOnly exec} {
1.326 + exec $env(COMSPEC) /c echo foo "" bar
1.327 +} {foo "" bar}
1.328 +test winpipe-7.2 {BuildCommandLine: null arguments} {pcOnly exec} {
1.329 + exec $env(COMSPEC) /c echo foo {} bar
1.330 +} {foo "" bar}
1.331 +test winpipe-7.3 {BuildCommandLine: dbl quote quoting #1} {pcOnly exec} {
1.332 + exec $env(COMSPEC) /c echo foo {"} bar
1.333 +} {foo \" bar}
1.334 +test winpipe-7.4 {BuildCommandLine: dbl quote quoting #2} {pcOnly exec} {
1.335 + exec $env(COMSPEC) /c echo foo {""} bar
1.336 +} {foo \"\" bar}
1.337 +test winpipe-7.5 {BuildCommandLine: dbl quote quoting #3} {pcOnly exec} {
1.338 + exec $env(COMSPEC) /c echo foo {" } bar
1.339 +} {foo "\" " bar}
1.340 +test winpipe-7.6 {BuildCommandLine: dbl quote quoting #4} {pcOnly exec} {
1.341 + exec $env(COMSPEC) /c echo foo {a="b"} bar
1.342 +} {foo a=\"b\" bar}
1.343 +test winpipe-7.7 {BuildCommandLine: dbl quote quoting #5} {pcOnly exec} {
1.344 + exec $env(COMSPEC) /c echo foo {a = "b"} bar
1.345 +} {foo "a = \"b\"" bar}
1.346 +test winpipe-7.8 {BuildCommandLine: dbl quote quoting #6} {pcOnly exec} {
1.347 + exec $env(COMSPEC) /c echo {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo}
1.348 +} {\"hello\" \"\"hello\"\" \"\"\"hello\"\"\" \"\\\"hello\\\"\" "he llo" "he \" llo"}
1.349 +test winpipe-7.9 {BuildCommandLine: N backslashes followed a quote rule #1} {pcOnly exec} {
1.350 + exec $env(COMSPEC) /c echo foo \\ bar
1.351 +} {foo \ bar}
1.352 +test winpipe-7.10 {BuildCommandLine: N backslashes followed a quote rule #2} {pcOnly exec} {
1.353 + exec $env(COMSPEC) /c echo foo \\\\ bar
1.354 +} {foo \\ bar}
1.355 +test winpipe-7.11 {BuildCommandLine: N backslashes followed a quote rule #3} {pcOnly exec} {
1.356 + exec $env(COMSPEC) /c echo foo \\\ \\ bar
1.357 +} {foo "\ \\" bar}
1.358 +test winpipe-7.12 {BuildCommandLine: N backslashes followed a quote rule #4} {pcOnly exec} {
1.359 + exec $env(COMSPEC) /c echo foo \\\ \\\\ bar
1.360 +} {foo "\ \\\\" bar}
1.361 +test winpipe-7.13 {BuildCommandLine: N backslashes followed a quote rule #5} {pcOnly exec} {
1.362 + exec $env(COMSPEC) /c echo foo \\\ \\\\\\ bar
1.363 +} {foo "\ \\\\\\" bar}
1.364 +test winpipe-7.14 {BuildCommandLine: N backslashes followed a quote rule #6} {pcOnly exec} {
1.365 + exec $env(COMSPEC) /c echo foo \\\ \\\" bar
1.366 +} {foo "\ \\\"" bar}
1.367 +test winpipe-7.15 {BuildCommandLine: N backslashes followed a quote rule #7} {pcOnly exec} {
1.368 + exec $env(COMSPEC) /c echo foo \\\ \\\\\" bar
1.369 +} {foo "\ \\\\\"" bar}
1.370 +test winpipe-7.16 {BuildCommandLine: N backslashes followed a quote rule #8} {pcOnly exec} {
1.371 + exec $env(COMSPEC) /c echo foo \\\ \\\\\\\" bar
1.372 +} {foo "\ \\\\\\\"" bar}
1.373 +test winpipe-7.17 {BuildCommandLine: special chars #4} {pcOnly exec} {
1.374 + exec $env(COMSPEC) /c echo foo \{ bar
1.375 +} "foo \{ bar"
1.376 +test winpipe-7.18 {BuildCommandLine: special chars #5} {pcOnly exec} {
1.377 + exec $env(COMSPEC) /c echo foo \} bar
1.378 +} "foo \} bar"
1.379 +
1.380 +### validate the pass-thru from BuildCommandLine() to the crt's parse_cmdline().
1.381 +###
1.382 +test winpipe-8.1 {BuildCommandLine/parse_cmdline pass-thru: null arguments} {pcOnly exec} {
1.383 + exec [interpreter] $path(echoArgs.tcl) foo "" bar
1.384 +} [list $path(echoArgs.tcl) [list foo {} bar]]
1.385 +test winpipe-8.2 {BuildCommandLine/parse_cmdline pass-thru: null arguments} {pcOnly exec} {
1.386 + exec [interpreter] $path(echoArgs.tcl) foo {} bar
1.387 +} [list $path(echoArgs.tcl) [list foo {} bar]]
1.388 +test winpipe-8.3 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #1} {pcOnly exec} {
1.389 + exec [interpreter] $path(echoArgs.tcl) foo {"} bar
1.390 +} [list $path(echoArgs.tcl) [list foo {"} bar]]
1.391 +test winpipe-8.4 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #2} {pcOnly exec} {
1.392 + exec [interpreter] $path(echoArgs.tcl) foo {""} bar
1.393 +} [list $path(echoArgs.tcl) [list foo {""} bar]]
1.394 +test winpipe-8.5 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #3} {pcOnly exec} {
1.395 + exec [interpreter] $path(echoArgs.tcl) foo {" } bar
1.396 +} [list $path(echoArgs.tcl) [list foo {" } bar]]
1.397 +test winpipe-8.6 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #4} {pcOnly exec} {
1.398 + exec [interpreter] $path(echoArgs.tcl) foo {a="b"} bar
1.399 +} [list $path(echoArgs.tcl) [list foo {a="b"} bar]]
1.400 +test winpipe-8.7 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #5} {pcOnly exec} {
1.401 + exec [interpreter] $path(echoArgs.tcl) foo {a = "b"} bar
1.402 +} [list $path(echoArgs.tcl) [list foo {a = "b"} bar]]
1.403 +test winpipe-8.8 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #6} {pcOnly exec} {
1.404 + exec [interpreter] $path(echoArgs.tcl) {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo}
1.405 +} [list $path(echoArgs.tcl) [list {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo}]]
1.406 +test winpipe-8.9 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #1} {pcOnly exec} {
1.407 + exec [interpreter] $path(echoArgs.tcl) foo \\ bar
1.408 +} [list $path(echoArgs.tcl) [list foo \\ bar]]
1.409 +test winpipe-8.10 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #2} {pcOnly exec} {
1.410 + exec [interpreter] $path(echoArgs.tcl) foo \\\\ bar
1.411 +} [list $path(echoArgs.tcl) [list foo \\\\ bar]]
1.412 +test winpipe-8.11 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #3} {pcOnly exec} {
1.413 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\ bar
1.414 +} [list $path(echoArgs.tcl) [list foo \\\ \\ bar]]
1.415 +test winpipe-8.12 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #4} {pcOnly exec} {
1.416 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\ bar
1.417 +} [list $path(echoArgs.tcl) [list foo \\\ \\\\ bar]]
1.418 +test winpipe-8.13 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #5} {pcOnly exec} {
1.419 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\\ bar
1.420 +} [list $path(echoArgs.tcl) [list foo \\\ \\\\\\ bar]]
1.421 +test winpipe-8.14 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #6} {pcOnly exec} {
1.422 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\" bar
1.423 +} [list $path(echoArgs.tcl) [list foo \\\ \\\" bar]]
1.424 +test winpipe-8.15 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #7} {pcOnly exec} {
1.425 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\" bar
1.426 +} [list $path(echoArgs.tcl) [list foo \\\ \\\\\" bar]]
1.427 +test winpipe-8.16 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #8} {pcOnly exec} {
1.428 + exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\\\" bar
1.429 +} [list $path(echoArgs.tcl) [list foo \\\ \\\\\\\" bar]]
1.430 +test winpipe-8.17 {BuildCommandLine/parse_cmdline pass-thru: special chars #1} {pcOnly exec} {
1.431 + exec [interpreter] $path(echoArgs.tcl) foo \{ bar
1.432 +} [list $path(echoArgs.tcl) [list foo \{ bar]]
1.433 +test winpipe-8.18 {BuildCommandLine/parse_cmdline pass-thru: special chars #2} {pcOnly exec} {
1.434 + exec [interpreter] $path(echoArgs.tcl) foo \} bar
1.435 +} [list $path(echoArgs.tcl) [list foo \} bar]]
1.436 +test winpipe-8.19 {ensure parse_cmdline isn't doing wildcard replacement} {pcOnly exec} {
1.437 + exec [interpreter] $path(echoArgs.tcl) foo * makefile.?c bar
1.438 +} [list $path(echoArgs.tcl) [list foo * makefile.?c bar]]
1.439 +
1.440 +# restore old values for env(TMP) and env(TEMP)
1.441 +
1.442 +if {[catch {set env(TMP) $env_tmp}]} {
1.443 + unset env(TMP)
1.444 +}
1.445 +if {[catch {set env(TEMP) $env_temp}]} {
1.446 + unset env(TEMP)
1.447 +}
1.448 +
1.449 +# cleanup
1.450 +file delete big little stdout stderr nothing echoArgs.tcl
1.451 +::tcltest::cleanupTests
1.452 +return