summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-16 15:46:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-16 15:46:04 (GMT)
commit4855172d084e45d52616436e03814adf900aeb89 (patch)
tree4da5a83b2045c557628e1a1d3e322d619a3a1d21 /tests/fCmd.test
parentee2c8b324fa577fbacf55ec66e2f51d8eec04ef0 (diff)
downloadtcl-4855172d084e45d52616436e03814adf900aeb89.zip
tcl-4855172d084e45d52616436e03814adf900aeb89.tar.gz
tcl-4855172d084e45d52616436e03814adf900aeb89.tar.bz2
Remove "Vista" from manifest. Test simplifications
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test59
1 files changed, 6 insertions, 53 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 004392f..5b70c81 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -22,8 +22,6 @@ cd [temporaryDirectory]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testchmod [llength [info commands testchmod]]
-testConstraint winVista 0
-testConstraint winXP 0
testConstraint win10 0
# Don't know how to determine this constraint correctly
testConstraint notNetworkFilesystem 0
@@ -65,18 +63,8 @@ if {[testConstraint unix]} {
}
}
-# Also used in winFCmd...
-if {[testConstraint win]} {
- if {$::tcl_platform(osVersion) >= 5.0} {
- if {$::tcl_platform(osVersion) >= 10.0} {
- testConstraint win10 1
- }
- if {$::tcl_platform(osVersion) >= 6.0} {
- testConstraint winVista 1
- } else {
- testConstraint win2000orXP 1
- }
- }
+if {[testConstraint win] && $::tcl_platform(osVersion) >= 10.0} {
+ testConstraint win10 1
}
testConstraint darwin9 [expr {
@@ -795,18 +783,7 @@ test fCmd-9.3 {file rename: comprehensive: file to new name} -setup {
file rename tf2 tf4
list [lsort [glob tf*]] [file writable tf3] [file writable tf4]
} -result {{tf3 tf4} 1 0}
-test fCmd-9.4.a {file rename: comprehensive: dir to new name} -setup {
- cleanup
-} -constraints {win winXP testchmod} -body {
- file mkdir td1 td2
- testchmod 0o555 td2
- file rename td1 td3
- file rename td2 td4
- list [lsort [glob td*]] [file writable td3] [file writable td4]
-} -cleanup {
- cleanup
-} -result {{td3 td4} 1 0}
-test fCmd-9.4.b {file rename: comprehensive: dir to new name} -setup {
+test fCmd-9.4 {file rename: comprehensive: dir to new name} -setup {
cleanup
} -constraints {unix notRoot testchmod notDarwin9} -body {
file mkdir td1 td2
@@ -827,17 +804,7 @@ test fCmd-9.5 {file rename: comprehensive: file to self} -setup {
file rename -force tf2 tf2
list [contents tf1] [contents tf2] [file writable tf1] [file writable tf2]
} -result {tf1 tf2 1 0}
-test fCmd-9.6.a {file rename: comprehensive: dir to self} -setup {
- cleanup
-} -constraints {win winXP testchmod} -body {
- file mkdir td1
- file mkdir td2
- testchmod 0o555 td2
- file rename -force td1 .
- file rename -force td2 .
- list [lsort [glob td*]] [file writable td1] [file writable td2]
-} -result {{td1 td2} 1 0}
-test fCmd-9.6.b {file rename: comprehensive: dir to self} -setup {
+test fCmd-9.6 {file rename: comprehensive: dir to self} -setup {
cleanup
} -constraints {unix notRoot testchmod} -body {
file mkdir td1
@@ -915,16 +882,9 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup {
file mkdir tds2
file mkdir [file join tdd1 tds1 xxx]
file mkdir [file join tdd2 tds2 xxx]
- if {!([testConstraint unix] || [testConstraint winVista])} {
- testchmod 0o555 tds2
- }
set a1 [list [catch {file rename -force tds1 tdd1} msg] $msg]
set a2 [list [catch {file rename -force tds2 tdd2} msg] $msg]
- if {[testConstraint unix] || [testConstraint winVista]} {
- set w2 0
- } else {
- set w2 [file writable tds2]
- }
+ set w2 0
list [lsort [glob td*]] $a1 $a2 [file writable tds1] $w2
} -match glob -result \
[subst {{tdd1 tdd2 tds1 tds2} {1 {error renaming "tds1" to "[file join tdd1 tds1]": file *}} {1 {error renaming "tds2" to "[file join tdd2 tds2]": file *}} 1 0}]
@@ -946,16 +906,9 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} -setup {
file mkdir td1
file mkdir td2
file mkdir td3
- if {!([testConstraint unix] || [testConstraint winVista])} {
- testchmod 0o555 td2
- }
file rename td1 [file join td3 td3]
file rename td2 [file join td3 td4]
- if {[testConstraint unix] || [testConstraint winVista]} {
- set w4 0
- } else {
- set w4 [file writable [file join td3 td4]]
- }
+ set w4 0
list [lsort [glob td*]] [lsort [glob -directory td3 t*]] \
[file writable [file join td3 td3]] $w4
} -result [subst {td3 {[file join td3 td3] [file join td3 td4]} 1 0}]