mirror of
https://github.com/tcltk/tcl.git
synced 2026-05-29 00:27:49 +08:00
Fix more test fragility with space-containing directory names
This commit is contained in:
@@ -757,12 +757,12 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix notValgrind noosx
|
||||
# can be executed on Windows
|
||||
test exec-20.0 {exec .bat file} -constraints {win} -body {
|
||||
set log [makeFile {} exec20.log]
|
||||
exec [makeFile "echo %1> $log" exec20.bat] "Testing exec-20.0"
|
||||
exec [makeFile "echo %1> \"$log\"" exec20.bat] "Testing exec-20.0"
|
||||
viewFile $log
|
||||
} -result "\"Testing exec-20.0\""
|
||||
test exec-20.1 {exec .CMD file} -constraints {win} -body {
|
||||
set log [makeFile {} exec201.log]
|
||||
exec [makeFile "echo %1> $log" exec201.CMD] "Testing exec-20.1"
|
||||
exec [makeFile "echo %1> \"$log\"" exec201.CMD] "Testing exec-20.1"
|
||||
viewFile $log
|
||||
} -result "\"Testing exec-20.1\""
|
||||
|
||||
|
||||
@@ -1614,7 +1614,7 @@ test fileName-20.10 {globbing for special chars} -setup {
|
||||
removeDirectory isolate
|
||||
removeFile fileName-20.10 $s
|
||||
removeDirectory sub [file home]
|
||||
} -result [file home]/sub/fileName-20.10
|
||||
} -result [list [file home]/sub/fileName-20.10]
|
||||
test fileName-20.11 {glob dir with undecodable file names} -setup {
|
||||
# Specifically use /tmp as on WSL [temporaryDirectory]
|
||||
# on NTFS prevents creation of arbitrary byte sequences in names.
|
||||
|
||||
@@ -192,7 +192,7 @@ test winpipe-4.1 {Tcl_WaitPid} {win exec cat32} {
|
||||
set result "$result$line"
|
||||
}
|
||||
}
|
||||
set f [open "|[list $cat32] < $path(big) 2> $path(stderr)" r]
|
||||
set f [open "|[list $cat32 < $path(big) 2> $path(stderr)]" r]
|
||||
fconfigure $f -buffering none -blocking 0
|
||||
fileevent $f readable "readResults $f"
|
||||
set x 0
|
||||
@@ -326,7 +326,7 @@ proc _testExecArgs {flags args} {
|
||||
} echoArgs.tcl]
|
||||
}
|
||||
if {![info exists path(echoArgs.bat)] || ![file exists $path(echoArgs.bat)]} {
|
||||
set path(echoArgs.bat) [makeFile "@[file native [interpreter]] $path(echoArgs.tcl) %*" "echoArgs.bat"]
|
||||
set path(echoArgs.bat) [makeFile "@\"[file native [interpreter]]\" \"$path(echoArgs.tcl)\" %*" "echoArgs.bat"]
|
||||
}
|
||||
set cmds [list [list [interpreter] $path(echoArgs.tcl)]]
|
||||
if {"exe-only" ni $flags} {
|
||||
@@ -335,7 +335,7 @@ proc _testExecArgs {flags args} {
|
||||
} else {
|
||||
if {![info exists path(echoArgs2.bat)] || ![file exists $path(echoArgs2.bat)]} {
|
||||
set path(echoArgs2.bat) [makeFile \
|
||||
"@[file native [interpreter]] $path(echoArgs.tcl) %*" \
|
||||
"@\"[file native [interpreter]]\" \"$path(echoArgs.tcl)\" %*" \
|
||||
"echo(Cmd)Test Args & Batch.bat" [makeDirectory test(Dir)Check]]
|
||||
}
|
||||
lappend cmds [list $path(echoArgs2.bat)]
|
||||
|
||||
Reference in New Issue
Block a user