summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-11-15 17:55:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-11-15 17:55:25 (GMT)
commit8a45c3faf392af5c64589268d0d7699c17b7feec (patch)
treea098b4e6b1d3b2a82e4d807dc53a33244eb57d2b /tests/fCmd.test
parenta06d3694d5af51acabffa650a8aaaa30e199d130 (diff)
downloadtcl-8a45c3faf392af5c64589268d0d7699c17b7feec.zip
tcl-8a45c3faf392af5c64589268d0d7699c17b7feec.tar.gz
tcl-8a45c3faf392af5c64589268d0d7699c17b7feec.tar.bz2
More complete purge of things only present for supporting long-dead Mac 9 systems.
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test55
1 files changed, 9 insertions, 46 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index eff2f80..c5ee676 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -86,11 +86,7 @@ proc openup {path} {
}
proc cleanup {args} {
- if {$::tcl_platform(platform) == "macintosh"} {
- set wd [list :]
- } else {
- set wd [list .]
- }
+ set wd [list .]
foreach p [concat $wd $args] {
set x ""
catch {
@@ -116,17 +112,6 @@ cd [temporaryDirectory]
set ::tcltest::testConstraints(fileSharing) 0
set ::tcltest::testConstraints(notFileSharing) 1
-
-if {$tcl_platform(platform) == "macintosh"} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- if {[catch {file attributes foo.dir -readonly 1}] == 0} {
- set ::tcltest::testConstraints(fileSharing) 1
- set ::tcltest::testConstraints(notFileSharing) 0
- }
- file delete -force foo.dir
-}
-
set ::tcltest::testConstraints(xdev) 0
if {$tcl_platform(platform) == "unix"} {
@@ -318,10 +303,6 @@ test fCmd-4.11 {TclFileMakeDirsCmd: doesn't exist: errno != ENOENT} \
testchmod 755 td1/td2
set msg
} {1 {can't create directory "td1/td2/td3": permission denied}}
-test fCmd-4.12 {TclFileMakeDirsCmd: doesn't exist: errno != ENOENT} {macOnly} {
- cleanup
- list [catch {file mkdir nonexistentvolume:} msg] $msg
-} {1 {can't create directory "nonexistentvolume:": invalid argument}}
test fCmd-4.13 {TclFileMakeDirsCmd: doesn't exist: errno == ENOENT} {notRoot} {
cleanup
set x [file exists td1]
@@ -338,9 +319,6 @@ test fCmd-4.14 {TclFileMakeDirsCmd: TclpCreateDirectory fails} \
file delete -force foo
set result
} {1 {can't create directory "foo/tf1": permission denied}}
-test fCmd-4.15 {TclFileMakeDirsCmd: TclpCreateDirectory fails} {macOnly} {
- list [catch {file mkdir ${root}:} msg] $msg
-} [subst {1 {can't create directory "${root}:": no such file or directory}}]
test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} {notRoot} {
cleanup
file mkdir tf1
@@ -457,11 +435,6 @@ test fCmd-6.7 {CopyRenameOneFile: errno != ENOENT} {pcOnly 95} {
createfile tf1
list [catch {file rename tf1 $long} msg] $msg
} [subst {1 {error renaming "tf1" to "$long": file name too long}}]
-test fCmd-6.8 {CopyRenameOneFile: errno != ENOENT} {macOnly} {
- cleanup
- createfile tf1
- list [catch {file rename tf1 $long} msg] $msg
-} [subst {1 {error renaming "tf1" to "$long": file name too long}}]
test fCmd-6.9 {CopyRenameOneFile: errno == ENOENT} {unixOnly notRoot} {
cleanup
createfile tf1
@@ -784,20 +757,18 @@ test fCmd-9.8 {file rename: comprehensive: dir to empty dir} {notRoot testchmod
file mkdir [file join tdd2 tds2]
file mkdir [file join tdd3 tds3]
file mkdir [file join tdd4 tds4]
- if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
testchmod 555 tds3
testchmod 555 tds4
}
- if {$tcl_platform(platform) != "macintosh"} {
- testchmod 555 [file join tdd2 tds2]
- testchmod 555 [file join tdd4 tds4]
- }
+ testchmod 555 [file join tdd2 tds2]
+ testchmod 555 [file join tdd4 tds4]
set msg [list [catch {file rename td1 td2} msg] $msg]
file rename -force tds1 tdd1
file rename -force tds2 tdd2
file rename -force tds3 tdd3
file rename -force tds4 tdd4
- if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
set w3 [file writable [file join tdd3 tds3]]
set w4 [file writable [file join tdd4 tds4]]
} else {
@@ -813,12 +784,12 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} {notRoot testch
file mkdir tds2
file mkdir [file join tdd1 tds1 xxx]
file mkdir [file join tdd2 tds2 xxx]
- if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} {
+ if {!([testConstraint unix] || [testConstraint winVista])} {
testchmod 555 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]) && $tcl_platform(platform) != "macintosh"} {
+ if {!([testConstraint unix] || [testConstraint winVista])} {
set w2 [file writable tds2]
} else {
set w2 0
@@ -841,12 +812,12 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} {notRoot te
file mkdir td1
file mkdir td2
file mkdir td3
- if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} {
+ if {!([testConstraint unix] || [testConstraint winVista])} {
testchmod 555 td2
}
file rename td1 [file join td3 td3]
file rename td2 [file join td3 td4]
- if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} {
+ if {!([testConstraint unix] || [testConstraint winVista])} {
set w4 [file writable [file join td3 td4]]
} else {
set w4 0
@@ -857,16 +828,12 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} {notRoot te
test fCmd-9.12 {file rename: comprehensive: target exists} {notRoot testchmod notNetworkFilesystem} {
cleanup
file mkdir [file join td1 td2] [file join td2 td1]
- if {$tcl_platform(platform) != "macintosh"} {
testchmod 555 [file join td2 td1]
- }
file mkdir [file join td3 td4] [file join td4 td3]
file rename -force td3 td4
set msg [list [file exists td3] [file exists [file join td4 td3 td4]] \
[catch {file rename td1 td2} msg] $msg]
- if {$tcl_platform(platform) != "macintosh"} {
testchmod 755 [file join td2 td1]
- }
set msg
} [subst {0 1 1 {error renaming "td1" to "[file join td2 td1]": file already exists}}]
test fCmd-9.13 {file rename: comprehensive: can't overwrite target} {notRoot} {
@@ -916,10 +883,8 @@ test fCmd-10.3 {file copy: comprehensive: dir to new name} {notRoot unixOrPc 95o
file copy td2 td4
set msg [list [lsort [glob td*]] [glob -directory td3 t*] \
[glob -directory td4 t*] [file writable td3] [file writable td4]]
- if {$tcl_platform(platform) != "macintosh"} {
testchmod 755 td2
testchmod 755 td4
- }
set msg
} [subst {{td1 td2 td3 td4} [file join td3 tdx] [file join td4 tdy] 1 0}]
test fCmd-10.3.1 {file copy: comprehensive: dir to new name} {notRoot pc 2000orNewer testchmod} {
@@ -971,12 +936,10 @@ test fCmd-10.5 {file copy: comprehensive: dir to empty dir} {notRoot testchmod}
file mkdir [file join tdd2 tds2]
file mkdir [file join tdd3 tds3]
file mkdir [file join tdd4 tds4]
- if {$tcl_platform(platform) != "macintosh"} {
testchmod 555 tds3
testchmod 555 tds4
testchmod 555 [file join tdd2 tds2]
testchmod 555 [file join tdd4 tds4]
- }
set a1 [list [catch {file copy td1 td2} msg] $msg]
set a2 [list [catch {file copy -force tds1 tdd1} msg] $msg]
set a3 [catch {file copy -force tds2 tdd2}]