summaryrefslogtreecommitdiffstats
path: root/tests/winPipe.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-08-30 11:14:15 (GMT)
committersebres <sebres@users.sourceforge.net>2018-08-30 11:14:15 (GMT)
commit0787b1d152a4545f5aa0d57574333a793d689c72 (patch)
tree1e73ac132a111608dedb536202119ea1f0f3ef16 /tests/winPipe.test
parent6dfe3f5de67a13e2704c56a1ee1d40ebabdf9c82 (diff)
parentcb9f3f92687994f262d7d65620616769857b590e (diff)
downloadtcl-0787b1d152a4545f5aa0d57574333a793d689c72.zip
tcl-0787b1d152a4545f5aa0d57574333a793d689c72.tar.gz
tcl-0787b1d152a4545f5aa0d57574333a793d689c72.tar.bz2
merge 8.6
Diffstat (limited to 'tests/winPipe.test')
-rw-r--r--tests/winPipe.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/winPipe.test b/tests/winPipe.test
index 56934e8..e246ad5 100644
--- a/tests/winPipe.test
+++ b/tests/winPipe.test
@@ -348,6 +348,10 @@ proc _testExecArgs {single args} {
if {$r ne $e} {
append broken "\[ERROR\]: exec [file extension [lindex $cmd 0]] on $args\n -- result:\n$r\n -- expected:\n$e\n"
}
+ if {$single & 8} {
+ # if test exe only:
+ break
+ }
}
}
return $broken
@@ -555,6 +559,32 @@ test winpipe-8.5 {BuildCommandLine/parse_cmdline pass-thru: check injection on s
unset -nocomplain lst args a map maps
}
+set injectList {
+ "test\"\nwhoami" "test\"\"\nwhoami"
+ "test\"\"\"\nwhoami" "test\"\"\"\"\nwhoami"
+ "test;\n&echo \"" "\"test;\n&echo \""
+ "test\";\n&echo \"" "\"test\";\n&echo \""
+ "\"\"test\";\n&echo \""
+}
+
+test winpipe-8.6 {BuildCommandLine/parse_cmdline pass-thru: check new-line quoted in args} \
+-constraints {win exec} -body {
+ # test exe only, because currently there is no proper way to escape a new-line char resp.
+ # to supply a new-line to the batch-files within arguments (command line is truncated).
+ _testExecArgs 8 \
+ [list START {*}$injectList END] \
+ [list "START\"" {*}$injectList END] \
+ [list START {*}$injectList "\"END"] \
+ [list "START\"" {*}$injectList "\"END"]
+} -result {}
+
+test winpipe-8.7 {BuildCommandLine/parse_cmdline pass-thru: check new-line quoted in args (batch)} \
+-constraints {win exec knownBug} -body {
+ # this will fail if executed batch-file, because currently there is no proper way to escape a new-line char.
+ _testExecArgs 0 $injectList
+} -result {}
+
+
rename _testExecArgs {}
# restore old values for env(TMP) and env(TEMP)