summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test41
1 files changed, 21 insertions, 20 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 53313dc..a1e0a6e 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -41,6 +41,7 @@ if {[testConstraint win]} {
testConstraint reg 1
}
}
+testConstraint notWine [expr {$::tcl_platform(platform) ne "windows" || ![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
set tmpspace /tmp;# default value
# Find a group that exists on this Unix system, or else skip tests that
@@ -416,7 +417,7 @@ test fCmd-5.4 {TclFileDeleteCmd: multiple files} -constraints notRoot -setup {
} -cleanup {cleanup} -result {1 1 1 0 0 0}
test fCmd-5.5 {TclFileDeleteCmd: stop at first error} -setup {
cleanup
-} -constraints {notRoot unixOrWin} -body {
+} -constraints {notRoot unixOrWin notWine} -body {
createfile tf1
createfile tf2
file mkdir td1
@@ -563,7 +564,7 @@ test fCmd-6.15 {CopyRenameOneFile: TclpRenameFile succeeds} -setup {
} -result 1
test fCmd-6.16 {CopyRenameOneFile: TclpCopyRenameOneFile fails} -setup {
cleanup
-} -constraints {notRoot} -body {
+} -constraints {notRoot notWine} -body {
file mkdir [file join td1 td2]
createfile [file join td1 td2 tf1]
file mkdir td2
@@ -572,12 +573,12 @@ test fCmd-6.16 {CopyRenameOneFile: TclpCopyRenameOneFile fails} -setup {
[subst {error renaming "td2" to "[file join td1 td2]": file *}]
test fCmd-6.17 {CopyRenameOneFile: errno == EINVAL} -setup {
cleanup
-} -constraints {notRoot} -returnCodes error -body {
+} -constraints {notRoot notWine} -returnCodes error -body {
file rename -force $root tf1
} -result [subst {error renaming "$root" to "tf1": trying to rename a volume or move a directory into itself}]
test fCmd-6.18 {CopyRenameOneFile: errno != EXDEV} -setup {
cleanup
-} -constraints {notRoot} -body {
+} -constraints {notRoot notWine} -body {
file mkdir [file join td1 td2]
createfile [file join td1 td2 tf1]
file mkdir td2
@@ -811,7 +812,7 @@ test fCmd-9.4.b {file rename: comprehensive: dir to new name} -setup {
} -result {{td3 td4} 1 0}
test fCmd-9.5 {file rename: comprehensive: file to self} -setup {
cleanup
-} -constraints {notRoot testchmod} -body {
+} -constraints {notRoot testchmod notWine} -body {
createfile tf1 tf1
createfile tf2 tf2
testchmod 0o444 tf2
@@ -841,7 +842,7 @@ test fCmd-9.6.b {file rename: comprehensive: dir to self} -setup {
} -result {{td1 td2} 1 0}
test fCmd-9.7 {file rename: comprehensive: file to existing file} -setup {
cleanup
-} -constraints {notRoot testchmod} -body {
+} -constraints {notRoot testchmod notWine} -body {
createfile tf1
createfile tf2
createfile tfs1
@@ -902,7 +903,7 @@ test fCmd-9.8 {file rename: comprehensive: dir to empty dir} -setup {
# Test can hit EEXIST or EBUSY, depending on underlying filesystem
test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup {
cleanup
-} -constraints {notRoot testchmod} -body {
+} -constraints {notRoot testchmod notWine} -body {
file mkdir tds1
file mkdir tds2
file mkdir [file join tdd1 tds1 xxx]
@@ -966,14 +967,14 @@ test fCmd-9.12 {file rename: comprehensive: target exists} -setup {
# Test can hit EEXIST or EBUSY, depending on underlying filesystem
test fCmd-9.13 {file rename: comprehensive: can't overwrite target} -setup {
cleanup
-} -constraints {notRoot} -body {
+} -constraints {notRoot notWine} -body {
file mkdir [file join td1 td2] [file join td2 td1 td4]
file rename -force td1 td2
} -returnCodes error -match glob -result \
[subst {error renaming "td1" to "[file join td2 td1]": file *}]
test fCmd-9.14 {file rename: comprehensive: dir into self} -setup {
cleanup
-} -constraints {notRoot} -body {
+} -constraints {notRoot notWine} -body {
file mkdir td1
list [glob td*] [list [catch {file rename td1 td1} msg] $msg]
} -result [subst {td1 {1 {error renaming "td1" to "[file join td1 td1]": trying to rename a volume or move a directory into itself}}}]
@@ -1068,7 +1069,7 @@ test fCmd-10.3.1 {file copy: comprehensive: dir to new name} -setup {
} -result [list {td1 td2 td3 td4} [file join td3 tdx] [file join td4 tdy] 1 1]
test fCmd-10.4 {file copy: comprehensive: file to existing file} -setup {
cleanup
-} -constraints {notRoot testchmod} -body {
+} -constraints {notRoot testchmod notWine} -body {
createfile tf1
createfile tf2
createfile tfs1
@@ -2401,7 +2402,7 @@ test fCmd-28.10.1 {file link: linking to nonexistent path} -setup {
test fCmd-28.11 {file link: success with directory} -setup {
cd [temporaryDirectory]
file delete -force abc.link
-} -constraints {linkDirectory} -body {
+} -constraints {linkDirectory notWine} -body {
file link abc.link abc.dir
} -cleanup {
cd [workingDirectory]
@@ -2409,7 +2410,7 @@ test fCmd-28.11 {file link: success with directory} -setup {
test fCmd-28.12 {file link: cd into a link} -setup {
cd [temporaryDirectory]
file delete -force abc.link
-} -constraints {linkDirectory} -body {
+} -constraints {linkDirectory notWine} -body {
file link abc.link abc.dir
set orig [pwd]
cd abc.link
@@ -2435,7 +2436,7 @@ test fCmd-28.12 {file link: cd into a link} -setup {
file delete -force abc.link
cd [workingDirectory]
} -result ok
-test fCmd-28.13 {file link} -constraints {linkDirectory} -setup {
+test fCmd-28.13 {file link} -constraints {linkDirectory notWine} -setup {
cd [temporaryDirectory]
file link abc.link abc.dir
} -body {
@@ -2469,7 +2470,7 @@ test fCmd-28.15.1 {file link: copies link not dir} -setup {
test fCmd-28.15.2 {file link: copies link not dir} -setup {
cd [temporaryDirectory]
file delete -force abc.link
-} -constraints {linkDirectory} -body {
+} -constraints {linkDirectory notWine} -body {
file link abc.link abc.dir
file copy abc.link abc2.link
list [file type abc2.link] [file tail [file link abc2.link]]
@@ -2490,7 +2491,7 @@ cd [workingDirectory]
test fCmd-28.16 {file link: glob inside link} -setup {
cd [temporaryDirectory]
file delete -force abc.link
-} -constraints {linkDirectory} -body {
+} -constraints {linkDirectory notWine} -body {
file link abc.link abc.dir
lsort [glob -dir abc.link -tails *]
} -cleanup {
@@ -2500,13 +2501,13 @@ test fCmd-28.16 {file link: glob inside link} -setup {
test fCmd-28.17 {file link: glob -type l} -setup {
cd [temporaryDirectory]
file link abc.link abc.dir
-} -constraints {linkDirectory} -body {
+} -constraints {linkDirectory notWine} -body {
glob -dir [pwd] -type l -tails abc*
} -cleanup {
file delete -force abc.link
cd [workingDirectory]
} -result {abc.link}
-test fCmd-28.18 {file link: glob -type d} -constraints linkDirectory -setup {
+test fCmd-28.18 {file link: glob -type d} -constraints {linkDirectory notWine} -setup {
cd [temporaryDirectory]
file link abc.link abc.dir
} -body {
@@ -2517,7 +2518,7 @@ test fCmd-28.18 {file link: glob -type d} -constraints linkDirectory -setup {
} -result [lsort [list abc.link abc.dir abc2.dir]]
test fCmd-28.19 {file link: relative paths} -setup {
cd [temporaryDirectory]
-} -constraints {win linkDirectory} -body {
+} -constraints {win linkDirectory notWine} -body {
file mkdir d1/d2/d3
file link d1/l2 d1/d2
} -cleanup {
@@ -2575,12 +2576,12 @@ test fCmd-30.1 {file writable on 'My Documents'} -setup {
} -constraints {win reg} -body {
file writable $mydocsname
} -result 1
-test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win} -body {
+test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win notWine} -body {
expr {[info exists env(USERPROFILE)]
&& [file exists $env(USERPROFILE)/NTUSER.DAT]
&& [file readable $env(USERPROFILE)/NTUSER.DAT]}
} -result {1}
-test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win} -body {
+test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win notWine} -body {
set r {}
if {[info exists env(SystemDrive)]} {
set path $env(SystemDrive)/pagefile.sys