summaryrefslogtreecommitdiffstats
path: root/tests/winFCmd.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-06-27 16:26:18 (GMT)
committersebres <sebres@users.sourceforge.net>2019-06-27 16:26:18 (GMT)
commitcdeaa86046bd3b6543fa85ecd2b8eab8697cd85d (patch)
tree83782a179a83f37e1747c402387ad372710dfa2c /tests/winFCmd.test
parent9237f2327b9ce8ef521cc5d1019606992d1adfc0 (diff)
parent574c3c0027c42be176a63ca592ce16f1c2bab151 (diff)
downloadtcl-cdeaa86046bd3b6543fa85ecd2b8eab8697cd85d.zip
tcl-cdeaa86046bd3b6543fa85ecd2b8eab8697cd85d.tar.gz
tcl-cdeaa86046bd3b6543fa85ecd2b8eab8697cd85d.tar.bz2
merge 8.6
Diffstat (limited to 'tests/winFCmd.test')
-rw-r--r--tests/winFCmd.test45
1 files changed, 25 insertions, 20 deletions
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index a0b7053..8a5173a 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.test
@@ -92,8 +92,13 @@ if {[testConstraint testvolumetype]} {
# NB: filename is chosen to be short but unlikely to clash with other apps
if {[file exists c:/] && [file exists d:/]} {
catch {file delete d:/TclTmpF.1}
- if {[catch {createfile d:/TclTmpF.1 {}}] == 0} {
- file delete d:/TclTmpF.1
+ catch {file delete d:/TclTmpD.1}
+ catch {file delete c:/TclTmpC.1}
+ if {![catch {createfile d:/TclTmpF.1 {}}] && [file isfile d:/TclTmpF.1]
+ && ![catch {file mkdir d:/TclTmpD.1}] && [file isdirectory d:/TclTmpD.1]
+ && ![catch {file mkdir c:/TclTmpC.1}] && [file isdirectory c:/TclTmpC.1]
+ } {
+ file delete d:/TclTmpF.1 d:/TclTmpD.1 c:/TclTmpC.1
testConstraint exdev 1
}
}
@@ -173,12 +178,12 @@ test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} -setup {
testfile mv td1 tf1
} -returnCodes error -result ENOTDIR
test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} -setup {
- file delete -force d:/tf1
+ file delete -force d:/TclTmpD.1
} -constraints {win exdev testfile} -body {
- file mkdir c:/tf1
- testfile mv c:/tf1 d:/tf1
+ file mkdir c:/TclTmpC.1
+ testfile mv c:/TclTmpC.1 d:/TclTmpD.1
} -cleanup {
- file delete -force c:/tf1
+ file delete -force c:/TclTmpC.1
} -returnCodes error -result EXDEV
test winFCmd-1.11 {TclpRenameFile: errno: EACCES} -setup {
cleanup
@@ -316,15 +321,15 @@ test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} -setup {
} -result {0 1 1}
test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \
-constraints {win exdev testfile testchmod} -body {
- file mkdir d:/td1
- testchmod 0 d:/td1
- file mkdir c:/tf1
- catch {testfile mv c:/tf1 d:/td1} msg
- list $msg [file writable d:/td1]
-} -cleanup {
- catch {testchmod 0o666 d:/td1}
- file delete d:/td1
- file delete -force c:/tf1
+ file mkdir d:/TclTmpD.1
+ testchmod 0 d:/TclTmpD.1
+ file mkdir c:/TclTmpC.1
+ catch {testfile mv c:/TclTmpC.1 d:/TclTmpD.1} msg
+ list $msg [file writable d:/TclTmpD.1]
+} -cleanup {
+ catch {testchmod 0o666 d:/TclTmpD.1}
+ file delete d:/TclTmpD.1
+ file delete -force c:/TclTmpC.1
} -result {EXDEV 0}
test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} -setup {
cleanup
@@ -1048,13 +1053,13 @@ test winFCmd-12.5 {ConvertFileNameFormat: absolute path} -body {
list [file attributes / -longname] [file attributes \\ -longname]
} -constraints {win} -result {/ /}
test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} -setup {
- catch {file delete -force -- c:/td1}
+ catch {file delete -force -- c:/TclTmpC.1}
} -constraints {win winXP} -body {
- createfile c:/td1 {}
- string tolower [file attributes c:/td1 -longname]
+ createfile c:/TclTmpC.1 {}
+ string tolower [file attributes c:/TclTmpC.1 -longname]
} -cleanup {
- file delete -force -- c:/td1
-} -result {c:/td1}
+ file delete -force -- c:/TclTmpC.1
+} -result [string tolower {c:/TclTmpC.1}]
test winFCmd-12.6.2 {ConvertFileNameFormat: absolute path with drive (in temp folder)} -setup {
catch {file delete -force -- $::env(TEMP)/td1}
} -constraints {win} -body {