sl@0: # sl@0: # winPipe.test -- sl@0: # sl@0: # This file contains a collection of tests for tclWinPipe.c sl@0: # sl@0: # Sourcing this file into Tcl runs the tests and generates output for sl@0: # errors. No output means no errors were found. sl@0: # sl@0: # Copyright (c) 1996 Sun Microsystems, Inc. sl@0: # Copyright (c) 1998-1999 by Scriptics Corporation. sl@0: # sl@0: # See the file "license.terms" for information on usage and redistribution sl@0: # of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: # sl@0: # RCS: @(#) $Id: winPipe.test,v 1.22.2.4 2005/04/20 00:14:54 hobbs Exp $ sl@0: sl@0: package require tcltest sl@0: namespace import -force ::tcltest::* sl@0: unset -nocomplain path sl@0: sl@0: testConstraint exec [llength [info commands exec]] sl@0: sl@0: set bindir [file join [pwd] [file dirname [info nameofexecutable]]] sl@0: set cat32 [file join $bindir cat32.exe] sl@0: sl@0: set ::tcltest::testConstraints(cat32) [file exists $cat32] sl@0: sl@0: if {[catch {puts console1 ""}]} { sl@0: set ::tcltest::testConstraints(AllocConsole) 1 sl@0: } else { sl@0: set ::tcltest::testConstraints(.console) 1 sl@0: } sl@0: sl@0: set big bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n sl@0: append big $big sl@0: append big $big sl@0: append big $big sl@0: append big $big sl@0: append big $big sl@0: append big $big sl@0: sl@0: set path(little) [makeFile {} little] sl@0: set f [open $path(little) w] sl@0: puts -nonewline $f "little" sl@0: close $f sl@0: sl@0: set path(big) [makeFile {} big] sl@0: set f [open $path(big) w] sl@0: puts -nonewline $f $big sl@0: close $f sl@0: sl@0: proc contents {file} { sl@0: set f [open $file r] sl@0: set r [read $f] sl@0: close $f sl@0: set r sl@0: } sl@0: sl@0: set path(more) [makeFile { sl@0: while {[eof stdin] == 0} { sl@0: puts -nonewline [read stdin] sl@0: } sl@0: } more] sl@0: sl@0: set path(stdout) [makeFile {} stdout] sl@0: set path(stderr) [makeFile {} stderr] sl@0: sl@0: test winpipe-1.1 {32 bit comprehensive tests: from little file} {pcOnly exec cat32} { sl@0: exec $cat32 < $path(little) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.2 {32 bit comprehensive tests: from big file} {pcOnly exec cat32} { sl@0: exec $cat32 < $path(big) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } "{$big} stderr32" sl@0: test winpipe-1.3 {32 bit comprehensive tests: a little from pipe} {pcOnly nt exec cat32} { sl@0: exec [interpreter] more < little | $cat32 > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.4 {32 bit comprehensive tests: a lot from pipe} {pcOnly nt exec cat32} { sl@0: exec [interpreter] more < big | $cat32 > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } "{$big} stderr32" sl@0: test winpipe-1.5 {32 bit comprehensive tests: a lot from pipe} {pcOnly 95 exec cat32} { sl@0: exec command /c type big |& $cat32 > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } "{$big} stderr32" sl@0: test winpipe-1.6 {32 bit comprehensive tests: from console} \ sl@0: {pcOnly cat32 AllocConsole} { sl@0: # would block waiting for human input sl@0: } {} sl@0: test winpipe-1.7 {32 bit comprehensive tests: from NUL} {pcOnly exec cat32} { sl@0: exec $cat32 < nul > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {{} stderr32} sl@0: test winpipe-1.8 {32 bit comprehensive tests: from socket} {pcOnly cat32} { sl@0: # doesn't work sl@0: } {} sl@0: test winpipe-1.9 {32 bit comprehensive tests: from nowhere} \ sl@0: {pcOnly exec cat32 .console} { sl@0: exec $cat32 > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {{} stderr32} sl@0: test winpipe-1.10 {32 bit comprehensive tests: from file handle} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open $path(little) r] sl@0: exec $cat32 <@$f > $path(stdout) 2> $path(stderr) sl@0: close $f sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.11 {32 bit comprehensive tests: read from application} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open "|[list $cat32] < $path(little)" r] sl@0: gets $f line sl@0: catch {close $f} msg sl@0: list $line $msg sl@0: } {little stderr32} sl@0: test winpipe-1.12 {32 bit comprehensive tests: a little to file} \ sl@0: {pcOnly exec cat32} { sl@0: exec $cat32 < $path(little) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.13 {32 bit comprehensive tests: a lot to file} \ sl@0: {pcOnly exec cat32} { sl@0: exec $cat32 < $path(big) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } "{$big} stderr32" sl@0: test winpipe-1.14 {32 bit comprehensive tests: a little to pipe} \ sl@0: {pcOnly exec stdio cat32} { sl@0: exec $cat32 < $path(little) | [interpreter] $path(more) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.15 {32 bit comprehensive tests: a lot to pipe} \ sl@0: {pcOnly exec stdio cat32} { sl@0: exec $cat32 < $path(big) | [interpreter] $path(more) > $path(stdout) 2> $path(stderr) sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } "{$big} stderr32" sl@0: test winpipe-1.16 {32 bit comprehensive tests: to console} {pcOnly exec cat32} { sl@0: catch {exec $cat32 << "You should see this\n" >@stdout} msg sl@0: set msg sl@0: } stderr32 sl@0: test winpipe-1.17 {32 bit comprehensive tests: to NUL} {pcOnly exec cat32} { sl@0: # some apps hang when sending a large amount to NUL. $cat32 isn't one. sl@0: catch {exec $cat32 < $path(big) > nul} msg sl@0: set msg sl@0: } stderr32 sl@0: test winpipe-1.18 {32 bit comprehensive tests: to nowhere} \ sl@0: {pcOnly exec cat32 .console} { sl@0: exec $cat32 < $path(big) >&@stdout sl@0: } {} sl@0: test winpipe-1.19 {32 bit comprehensive tests: to file handle} {pcOnly exec cat32} { sl@0: set f1 [open $path(stdout) w] sl@0: set f2 [open $path(stderr) w] sl@0: exec $cat32 < $path(little) >@$f1 2>@$f2 sl@0: close $f1 sl@0: close $f2 sl@0: list [contents $path(stdout)] [contents $path(stderr)] sl@0: } {little stderr32} sl@0: test winpipe-1.20 {32 bit comprehensive tests: write to application} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open |[list $cat32 >$path(stdout)] w] sl@0: puts -nonewline $f "foo" sl@0: catch {close $f} msg sl@0: list [contents $path(stdout)] $msg sl@0: } {foo stderr32} sl@0: test winpipe-1.21 {32 bit comprehensive tests: read/write application} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open "|[list $cat32]" r+] sl@0: puts $f $big sl@0: puts $f \032 sl@0: flush $f sl@0: set r [read $f 64] sl@0: catch {close $f} sl@0: set r sl@0: } "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" sl@0: test winpipe-1.22 {Checking command.com for Win95/98 hanging} {pcOnly 95 exec} { sl@0: exec command.com /c dir /b sl@0: set result 1 sl@0: } 1 sl@0: file delete more sl@0: sl@0: test winpipe-4.1 {Tcl_WaitPid} {pcOnly nt exec cat32} { sl@0: proc readResults {f} { sl@0: global x result sl@0: if { [eof $f] } { sl@0: close $f sl@0: set x 1 sl@0: } else { sl@0: set line [read $f ] sl@0: set result "$result$line" sl@0: } sl@0: } sl@0: sl@0: set f [open "|[list $cat32] < big 2> $path(stderr)" r] sl@0: fconfigure $f -buffering none -blocking 0 sl@0: fileevent $f readable "readResults $f" sl@0: set x 0 sl@0: set result "" sl@0: vwait x sl@0: list $result $x [contents $path(stderr)] sl@0: } "{$big} 1 stderr32" sl@0: test winpipe-4.2 {Tcl_WaitPid: return of exception codes, SIGFPE} {pcOnly exec} { sl@0: set f [open "|[tcltest::interpreter]" w+] sl@0: set pid [pid $f] sl@0: puts $f "testexcept float_underflow" sl@0: set status [catch {close $f}] sl@0: list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] sl@0: } {1 1 SIGFPE} sl@0: test winpipe-4.3 {Tcl_WaitPid: return of exception codes, SIGSEGV} {pcOnly exec} { sl@0: set f [open "|[tcltest::interpreter]" w+] sl@0: set pid [pid $f] sl@0: puts $f "testexcept access_violation" sl@0: set status [catch {close $f}] sl@0: list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] sl@0: } {1 1 SIGSEGV} sl@0: test winpipe-4.4 {Tcl_WaitPid: return of exception codes, SIGILL} {pcOnly exec} { sl@0: set f [open "|[tcltest::interpreter]" w+] sl@0: set pid [pid $f] sl@0: puts $f "testexcept illegal_instruction" sl@0: set status [catch {close $f}] sl@0: list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] sl@0: } {1 1 SIGILL} sl@0: test winpipe-4.5 {Tcl_WaitPid: return of exception codes, SIGINT} {pcOnly exec} { sl@0: set f [open "|[tcltest::interpreter]" w+] sl@0: set pid [pid $f] sl@0: puts $f "testexcept ctrl+c" sl@0: set status [catch {close $f}] sl@0: list $status [expr {$pid == [lindex $::errorCode 1]}] [lindex $::errorCode 2] sl@0: } {1 1 SIGINT} sl@0: sl@0: set path(nothing) [makeFile {} nothing] sl@0: close [open $path(nothing) w] sl@0: sl@0: catch {set env_tmp $env(TMP)} sl@0: catch {set env_temp $env(TEMP)} sl@0: sl@0: set env(TMP) c:/ sl@0: set env(TEMP) c:/ sl@0: sl@0: test winpipe-5.1 {TclpCreateTempFile: cleanup temp files} {pcOnly exec} { sl@0: set x {} sl@0: set existing [glob -nocomplain c:/tcl*.tmp] sl@0: exec [interpreter] < nothing sl@0: foreach p [glob -nocomplain c:/tcl*.tmp] { sl@0: if {[lsearch $existing $p] == -1} { sl@0: lappend x $p sl@0: } sl@0: } sl@0: set x sl@0: } {} sl@0: test winpipe-5.2 {TclpCreateTempFile: TMP and TEMP not defined} {pcOnly exec} { sl@0: set tmp $env(TMP) sl@0: set temp $env(TEMP) sl@0: unset env(TMP) sl@0: unset env(TEMP) sl@0: exec [interpreter] < nothing sl@0: set env(TMP) $tmp sl@0: set env(TEMP) $temp sl@0: set x {} sl@0: } {} sl@0: test winpipe-5.3 {TclpCreateTempFile: TMP specifies non-existent directory} \ sl@0: {pcOnly exec } { sl@0: set tmp $env(TMP) sl@0: set env(TMP) snarky sl@0: exec [interpreter] < nothing sl@0: set env(TMP) $tmp sl@0: set x {} sl@0: } {} sl@0: test winpipe-5.4 {TclpCreateTempFile: TEMP specifies non-existent directory} \ sl@0: {pcOnly exec} { sl@0: set tmp $env(TMP) sl@0: set temp $env(TEMP) sl@0: unset env(TMP) sl@0: set env(TEMP) snarky sl@0: exec [interpreter] < nothing sl@0: set env(TMP) $tmp sl@0: set env(TEMP) $temp sl@0: set x {} sl@0: } {} sl@0: sl@0: test winpipe-6.1 {PipeSetupProc & PipeCheckProc: read threads} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open "|[list $cat32]" r+] sl@0: fconfigure $f -blocking 0 sl@0: fileevent $f writable { set x writable } sl@0: set x {} sl@0: vwait x sl@0: fileevent $f writable {} sl@0: fileevent $f readable { lappend x readable } sl@0: after 100 { lappend x timeout } sl@0: vwait x sl@0: puts $f foobar sl@0: flush $f sl@0: vwait x sl@0: lappend x [read $f] sl@0: after 100 { lappend x timeout } sl@0: vwait x sl@0: fconfigure $f -blocking 1 sl@0: lappend x [catch {close $f} msg] $msg sl@0: } {writable timeout readable {foobar sl@0: } timeout 1 stderr32} sl@0: test winpipe-6.2 {PipeSetupProc & PipeCheckProc: write threads} \ sl@0: {pcOnly exec cat32} { sl@0: set f [open "|[list $cat32]" r+] sl@0: fconfigure $f -blocking 0 sl@0: fileevent $f writable { set x writable } sl@0: set x {} sl@0: vwait x sl@0: puts -nonewline $f $big$big$big$big sl@0: flush $f sl@0: after 100 { lappend x timeout } sl@0: vwait x sl@0: lappend x [catch {close $f} msg] $msg sl@0: } {writable timeout 0 {}} sl@0: sl@0: set path(echoArgs.tcl) [makeFile { sl@0: puts "[list $argv0 $argv]" sl@0: } echoArgs.tcl] sl@0: sl@0: ### validate the raw output of BuildCommandLine(). sl@0: ### sl@0: test winpipe-7.1 {BuildCommandLine: null arguments} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo "" bar sl@0: } {foo "" bar} sl@0: test winpipe-7.2 {BuildCommandLine: null arguments} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {} bar sl@0: } {foo "" bar} sl@0: test winpipe-7.3 {BuildCommandLine: dbl quote quoting #1} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {"} bar sl@0: } {foo \" bar} sl@0: test winpipe-7.4 {BuildCommandLine: dbl quote quoting #2} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {""} bar sl@0: } {foo \"\" bar} sl@0: test winpipe-7.5 {BuildCommandLine: dbl quote quoting #3} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {" } bar sl@0: } {foo "\" " bar} sl@0: test winpipe-7.6 {BuildCommandLine: dbl quote quoting #4} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {a="b"} bar sl@0: } {foo a=\"b\" bar} sl@0: test winpipe-7.7 {BuildCommandLine: dbl quote quoting #5} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo {a = "b"} bar sl@0: } {foo "a = \"b\"" bar} sl@0: test winpipe-7.8 {BuildCommandLine: dbl quote quoting #6} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo} sl@0: } {\"hello\" \"\"hello\"\" \"\"\"hello\"\"\" \"\\\"hello\\\"\" "he llo" "he \" llo"} sl@0: test winpipe-7.9 {BuildCommandLine: N backslashes followed a quote rule #1} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\ bar sl@0: } {foo \ bar} sl@0: test winpipe-7.10 {BuildCommandLine: N backslashes followed a quote rule #2} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\\ bar sl@0: } {foo \\ bar} sl@0: test winpipe-7.11 {BuildCommandLine: N backslashes followed a quote rule #3} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\ bar sl@0: } {foo "\ \\" bar} sl@0: test winpipe-7.12 {BuildCommandLine: N backslashes followed a quote rule #4} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\\\ bar sl@0: } {foo "\ \\\\" bar} sl@0: test winpipe-7.13 {BuildCommandLine: N backslashes followed a quote rule #5} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\\\\\ bar sl@0: } {foo "\ \\\\\\" bar} sl@0: test winpipe-7.14 {BuildCommandLine: N backslashes followed a quote rule #6} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\\" bar sl@0: } {foo "\ \\\"" bar} sl@0: test winpipe-7.15 {BuildCommandLine: N backslashes followed a quote rule #7} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\\\\" bar sl@0: } {foo "\ \\\\\"" bar} sl@0: test winpipe-7.16 {BuildCommandLine: N backslashes followed a quote rule #8} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \\\ \\\\\\\" bar sl@0: } {foo "\ \\\\\\\"" bar} sl@0: test winpipe-7.17 {BuildCommandLine: special chars #4} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \{ bar sl@0: } "foo \{ bar" sl@0: test winpipe-7.18 {BuildCommandLine: special chars #5} {pcOnly exec} { sl@0: exec $env(COMSPEC) /c echo foo \} bar sl@0: } "foo \} bar" sl@0: sl@0: ### validate the pass-thru from BuildCommandLine() to the crt's parse_cmdline(). sl@0: ### sl@0: test winpipe-8.1 {BuildCommandLine/parse_cmdline pass-thru: null arguments} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo "" bar sl@0: } [list $path(echoArgs.tcl) [list foo {} bar]] sl@0: test winpipe-8.2 {BuildCommandLine/parse_cmdline pass-thru: null arguments} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {} bar sl@0: } [list $path(echoArgs.tcl) [list foo {} bar]] sl@0: test winpipe-8.3 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #1} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {"} bar sl@0: } [list $path(echoArgs.tcl) [list foo {"} bar]] sl@0: test winpipe-8.4 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #2} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {""} bar sl@0: } [list $path(echoArgs.tcl) [list foo {""} bar]] sl@0: test winpipe-8.5 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #3} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {" } bar sl@0: } [list $path(echoArgs.tcl) [list foo {" } bar]] sl@0: test winpipe-8.6 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #4} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {a="b"} bar sl@0: } [list $path(echoArgs.tcl) [list foo {a="b"} bar]] sl@0: test winpipe-8.7 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #5} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo {a = "b"} bar sl@0: } [list $path(echoArgs.tcl) [list foo {a = "b"} bar]] sl@0: test winpipe-8.8 {BuildCommandLine/parse_cmdline pass-thru: dbl quote quoting #6} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo} sl@0: } [list $path(echoArgs.tcl) [list {"hello"} {""hello""} {"""hello"""} {"\"hello\""} {he llo} {he " llo}]] sl@0: test winpipe-8.9 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #1} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\ bar sl@0: } [list $path(echoArgs.tcl) [list foo \\ bar]] sl@0: test winpipe-8.10 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #2} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\\ bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\\ bar]] sl@0: test winpipe-8.11 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #3} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\ bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\ bar]] sl@0: test winpipe-8.12 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #4} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\ bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\\\ bar]] sl@0: test winpipe-8.13 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #5} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\\ bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\\\\\ bar]] sl@0: test winpipe-8.14 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #6} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\" bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\\" bar]] sl@0: test winpipe-8.15 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #7} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\" bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\\\\" bar]] sl@0: test winpipe-8.16 {BuildCommandLine/parse_cmdline pass-thru: N backslashes followed a quote rule #8} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \\\ \\\\\\\" bar sl@0: } [list $path(echoArgs.tcl) [list foo \\\ \\\\\\\" bar]] sl@0: test winpipe-8.17 {BuildCommandLine/parse_cmdline pass-thru: special chars #1} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \{ bar sl@0: } [list $path(echoArgs.tcl) [list foo \{ bar]] sl@0: test winpipe-8.18 {BuildCommandLine/parse_cmdline pass-thru: special chars #2} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo \} bar sl@0: } [list $path(echoArgs.tcl) [list foo \} bar]] sl@0: test winpipe-8.19 {ensure parse_cmdline isn't doing wildcard replacement} {pcOnly exec} { sl@0: exec [interpreter] $path(echoArgs.tcl) foo * makefile.?c bar sl@0: } [list $path(echoArgs.tcl) [list foo * makefile.?c bar]] sl@0: sl@0: # restore old values for env(TMP) and env(TEMP) sl@0: sl@0: if {[catch {set env(TMP) $env_tmp}]} { sl@0: unset env(TMP) sl@0: } sl@0: if {[catch {set env(TEMP) $env_temp}]} { sl@0: unset env(TEMP) sl@0: } sl@0: sl@0: # cleanup sl@0: file delete big little stdout stderr nothing echoArgs.tcl sl@0: ::tcltest::cleanupTests sl@0: return