summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordas <das>2004-03-17 18:14:11 (GMT)
committerdas <das>2004-03-17 18:14:11 (GMT)
commit0205867a3dad7204c57477b6c38c52b981af36e1 (patch)
treeb40c5ed765d71e7cb68ba178c3f3a098638c9987 /tests
parentb07cf17d9c57bb355e84b17470235902854c7d40 (diff)
downloadtcl-0205867a3dad7204c57477b6c38c52b981af36e1.zip
tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.gz
tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.bz2
Removed support for Mac OS Classic platform [Patch 918142]
Diffstat (limited to 'tests')
-rw-r--r--tests/all.tcl6
-rw-r--r--tests/binary.test69
-rw-r--r--tests/cmdAH.test271
-rw-r--r--tests/cmdMZ.test8
-rw-r--r--tests/fCmd.test78
-rw-r--r--tests/fileName.test574
-rw-r--r--tests/fileSystem.test10
-rw-r--r--tests/interp.test28
-rw-r--r--tests/io.test16
-rw-r--r--tests/ioCmd.test8
-rw-r--r--tests/load.test8
-rw-r--r--tests/macFCmd.test204
-rw-r--r--tests/osa.test48
-rw-r--r--tests/resource.test369
-rw-r--r--tests/socket.test12
-rw-r--r--tests/source.test105
-rwxr-xr-xtests/tcltest.test5
-rw-r--r--tests/unload.test8
18 files changed, 84 insertions, 1743 deletions
diff --git a/tests/all.tcl b/tests/all.tcl
index 3faa12a..f5e7c39 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -10,15 +10,11 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: all.tcl,v 1.16 2002/04/10 19:57:15 hobbs Exp $
+# RCS: @(#) $Id: all.tcl,v 1.17 2004/03/17 18:14:17 das Exp $
set tcltestVersion [package require tcltest]
namespace import -force tcltest::*
-if {$tcl_platform(platform) == "macintosh"} {
- tcltest::singleProcess 1
-}
-
tcltest::testsDirectory [file dir [info script]]
tcltest::runAllTests
diff --git a/tests/binary.test b/tests/binary.test
index 809bb00..cf30f44 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: binary.test,v 1.13 2003/12/02 09:29:54 dkf Exp $
+# RCS: @(#) $Id: binary.test,v 1.14 2004/03/17 18:14:17 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -426,37 +426,37 @@ test binary-13.2 {Tcl_BinaryObjCmd: format} {
test binary-13.3 {Tcl_BinaryObjCmd: format} {
binary format f0 1.6
} {}
-test binary-13.4 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-13.4 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format f 1.6
} \x3f\xcc\xcc\xcd
test binary-13.5 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format f 1.6
} \xcd\xcc\xcc\x3f
-test binary-13.6 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-13.6 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format f* {1.6 3.4}
} \x3f\xcc\xcc\xcd\x40\x59\x99\x9a
test binary-13.7 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format f* {1.6 3.4}
} \xcd\xcc\xcc\x3f\x9a\x99\x59\x40
-test binary-13.8 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-13.8 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format f2 {1.6 3.4}
} \x3f\xcc\xcc\xcd\x40\x59\x99\x9a
test binary-13.9 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format f2 {1.6 3.4}
} \xcd\xcc\xcc\x3f\x9a\x99\x59\x40
-test binary-13.10 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-13.10 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format f2 {1.6 3.4 5.6}
} \x3f\xcc\xcc\xcd\x40\x59\x99\x9a
test binary-13.11 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format f2 {1.6 3.4 5.6}
} \xcd\xcc\xcc\x3f\x9a\x99\x59\x40
-test binary-13.12 {Tcl_BinaryObjCmd: float overflow} {nonPortable macOrUnix} {
+test binary-13.12 {Tcl_BinaryObjCmd: float overflow} {nonPortable unixOnly} {
binary format f -3.402825e+38
} \xff\x7f\xff\xff
test binary-13.13 {Tcl_BinaryObjCmd: float overflow} {nonPortable pcOnly} {
binary format f -3.402825e+38
} \xff\xff\x7f\xff
-test binary-13.14 {Tcl_BinaryObjCmd: float underflow} {nonPortable macOrUnix} {
+test binary-13.14 {Tcl_BinaryObjCmd: float underflow} {nonPortable unixOnly} {
binary format f -3.402825e-100
} \x80\x00\x00\x00
test binary-13.15 {Tcl_BinaryObjCmd: float underflow} {nonPortable pcOnly} {
@@ -469,7 +469,7 @@ test binary-13.17 {Tcl_BinaryObjCmd: format} {
set a {1.6 3.4}
list [catch {binary format f $a} msg] $msg
} [list 1 "expected floating-point number but got \"1.6 3.4\""]
-test binary-13.18 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-13.18 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
set a {1.6 3.4}
binary format f1 $a
} \x3f\xcc\xcc\xcd
@@ -487,25 +487,25 @@ test binary-14.2 {Tcl_BinaryObjCmd: format} {
test binary-14.3 {Tcl_BinaryObjCmd: format} {
binary format d0 1.6
} {}
-test binary-14.4 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-14.4 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format d 1.6
} \x3f\xf9\x99\x99\x99\x99\x99\x9a
test binary-14.5 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format d 1.6
} \x9a\x99\x99\x99\x99\x99\xf9\x3f
-test binary-14.6 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-14.6 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format d* {1.6 3.4}
} \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33
test binary-14.7 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format d* {1.6 3.4}
} \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40
-test binary-14.8 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-14.8 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format d2 {1.6 3.4}
} \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33
test binary-14.9 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
binary format d2 {1.6 3.4}
} \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40
-test binary-14.10 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-14.10 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
binary format d2 {1.6 3.4 5.6}
} \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33
test binary-14.11 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
@@ -514,9 +514,6 @@ test binary-14.11 {Tcl_BinaryObjCmd: format} {nonPortable pcOnly} {
test binary-14.12 {Tcl_BinaryObjCmd: float overflow} {nonPortable unixOnly} {
binary format d NaN
} \x7f\xff\xff\xff\xff\xff\xff\xff
-test binary-14.13 {Tcl_BinaryObjCmd: float overflow} {nonPortable macOnly} {
- binary format d NaN
-} \x7f\xf8\x02\xa0\x00\x00\x00\x00
test binary-14.14 {Tcl_BinaryObjCmd: format} {
list [catch {binary format d2 {1.6}} msg] $msg
} {1 {number of elements in list does not match count}}
@@ -524,7 +521,7 @@ test binary-14.15 {Tcl_BinaryObjCmd: format} {
set a {1.6 3.4}
list [catch {binary format d $a} msg] $msg
} [list 1 "expected floating-point number but got \"1.6 3.4\""]
-test binary-14.16 {Tcl_BinaryObjCmd: format} {nonPortable macOrUnix} {
+test binary-14.16 {Tcl_BinaryObjCmd: format} {nonPortable unixOnly} {
set a {1.6 3.4}
binary format d1 $a
} \x3f\xf9\x99\x99\x99\x99\x99\x9a
@@ -1069,7 +1066,7 @@ test binary-30.9 {Tcl_BinaryObjCmd: scan} {
test binary-31.1 {Tcl_BinaryObjCmd: scan} {
list [catch {binary scan abc f} msg] $msg
} {1 {not enough arguments for all format specifiers}}
-test binary-31.2 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.2 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f* arg1] $arg1
} {1 {1.60000002384 3.40000009537}}
@@ -1077,7 +1074,7 @@ test binary-31.3 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f* arg1] $arg1
} {1 {1.60000002384 3.40000009537}}
-test binary-31.4 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.4 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f arg1] $arg1
} {1 1.60000002384}
@@ -1085,7 +1082,7 @@ test binary-31.5 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f arg1] $arg1
} {1 1.60000002384}
-test binary-31.6 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.6 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xcc\xcc\xcd f1 arg1] $arg1
} {1 1.60000002384}
@@ -1093,7 +1090,7 @@ test binary-31.7 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \xcd\xcc\xcc\x3f f1 arg1] $arg1
} {1 1.60000002384}
-test binary-31.8 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.8 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xcc\xcc\xcd f0 arg1] $arg1
} {1 {}}
@@ -1101,7 +1098,7 @@ test binary-31.9 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \xcd\xcc\xcc\x3f f0 arg1] $arg1
} {1 {}}
-test binary-31.10 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.10 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f2 arg1] $arg1
} {1 {1.60000002384 3.40000009537}}
@@ -1119,7 +1116,7 @@ test binary-31.13 {Tcl_BinaryObjCmd: scan} {
set arg1 1
list [catch {binary scan \x3f\xcc\xcc\xcd f1 arg1(a)} msg] $msg
} {1 {can't set "arg1(a)": variable isn't array}}
-test binary-31.14 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-31.14 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1 arg2}
set arg1 foo
set arg2 bar
@@ -1135,7 +1132,7 @@ test binary-31.15 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
test binary-32.1 {Tcl_BinaryObjCmd: scan} {
list [catch {binary scan abc d} msg] $msg
} {1 {not enough arguments for all format specifiers}}
-test binary-32.2 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.2 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d* arg1] $arg1
} {1 {1.6 3.4}}
@@ -1143,7 +1140,7 @@ test binary-32.3 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d* arg1] $arg1
} {1 {1.6 3.4}}
-test binary-32.4 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.4 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d arg1] $arg1
} {1 1.6}
@@ -1151,7 +1148,7 @@ test binary-32.5 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d arg1] $arg1
} {1 1.6}
-test binary-32.6 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.6 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1] $arg1
} {1 1.6}
@@ -1159,7 +1156,7 @@ test binary-32.7 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d1 arg1] $arg1
} {1 1.6}
-test binary-32.8 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.8 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d0 arg1] $arg1
} {1 {}}
@@ -1167,7 +1164,7 @@ test binary-32.9 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {
catch {unset arg1}
list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d0 arg1] $arg1
} {1 {}}
-test binary-32.10 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.10 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d2 arg1] $arg1
} {1 {1.6 3.4}}
@@ -1185,7 +1182,7 @@ test binary-32.13 {Tcl_BinaryObjCmd: scan} {
set arg1 1
list [catch {binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1(a)} msg] $msg
} {1 {can't set "arg1(a)": variable isn't array}}
-test binary-32.14 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {
+test binary-32.14 {Tcl_BinaryObjCmd: scan} {nonPortable unixOnly} {
catch {unset arg1 arg2}
set arg1 foo
set arg2 bar
@@ -1351,13 +1348,13 @@ test binary-38.3 {FormatNumber: word alignment} {
test binary-38.4 {FormatNumber: word alignment} {
set x [binary format c1I1 1 1]
} \x01\x00\x00\x00\x01
-test binary-38.5 {FormatNumber: word alignment} {nonPortable macOrUnix} {
+test binary-38.5 {FormatNumber: word alignment} {nonPortable unixOnly} {
set x [binary format c1d1 1 1.6]
} \x01\x3f\xf9\x99\x99\x99\x99\x99\x9a
test binary-38.6 {FormatNumber: word alignment} {nonPortable pcOnly} {
set x [binary format c1d1 1 1.6]
} \x01\x9a\x99\x99\x99\x99\x99\xf9\x3f
-test binary-38.7 {FormatNumber: word alignment} {nonPortable macOrUnix} {
+test binary-38.7 {FormatNumber: word alignment} {nonPortable unixOnly} {
set x [binary format c1f1 1 1.6]
} \x01\x3f\xcc\xcc\xcd
test binary-38.8 {FormatNumber: word alignment} {nonPortable pcOnly} {
@@ -1389,10 +1386,6 @@ test binary-40.1 {ScanNumber: floating point overflow} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \xff\xff\xff\xff f1 arg1] $arg1
} {1 -NaN}
-test binary-40.2 {ScanNumber: floating point overflow} {nonPortable macOnly} {
- catch {unset arg1}
- list [binary scan \xff\xff\xff\xff f1 arg1] $arg1
-} {1 -NAN(255)}
test binary-40.3 {ScanNumber: floating point overflow} {nonPortable pcOnly} {
catch {unset arg1}
set result [binary scan \xff\xff\xff\xff f1 arg1]
@@ -1407,10 +1400,6 @@ test binary-40.4 {ScanNumber: floating point overflow} {nonPortable unixOnly} {
catch {unset arg1}
list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] $arg1
} {1 -NaN}
-test binary-40.5 {ScanNumber: floating point overflow} {nonPortable macOnly} {
- catch {unset arg1}
- list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] $arg1
-} {1 -NAN(255)}
test binary-40.6 {ScanNumber: floating point overflow} {nonPortable pcOnly} {
catch {unset arg1}
set result [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1]
@@ -1438,7 +1427,7 @@ test binary-41.4 {ScanNumber: word alignment} {
catch {unset arg1; unset arg2}
list [binary scan \x01\x00\x00\x00\x01 c1I1 arg1 arg2] $arg1 $arg2
} {2 1 1}
-test binary-41.5 {ScanNumber: word alignment} {nonPortable macOrUnix} {
+test binary-41.5 {ScanNumber: word alignment} {nonPortable unixOnly} {
catch {unset arg1; unset arg2}
list [binary scan \x01\x3f\xcc\xcc\xcd c1f1 arg1 arg2] $arg1 $arg2
} {2 1 1.60000002384}
@@ -1446,7 +1435,7 @@ test binary-41.6 {ScanNumber: word alignment} {nonPortable pcOnly} {
catch {unset arg1; unset arg2}
list [binary scan \x01\xcd\xcc\xcc\x3f c1f1 arg1 arg2] $arg1 $arg2
} {2 1 1.60000002384}
-test binary-41.7 {ScanNumber: word alignment} {nonPortable macOrUnix} {
+test binary-41.7 {ScanNumber: word alignment} {nonPortable unixOnly} {
catch {unset arg1; unset arg2}
list [binary scan \x01\x3f\xf9\x99\x99\x99\x99\x99\x9a c1d1 arg1 arg2] $arg1 $arg2
} {2 1 1.6}
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 436425b..834177c 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdAH.test,v 1.37 2003/10/07 21:45:38 dgp Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.38 2004/03/17 18:14:17 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -205,7 +205,7 @@ test cmdAH-6.2 {Tcl_FileObjCmd: volumes} {
set result 1
}
} {1}
-test cmdAH-6.3 {Tcl_FileObjCmd: volumes} {macOrUnix} {
+test cmdAH-6.3 {Tcl_FileObjCmd: volumes} {unixOnly} {
set volumeList [file volumes]
catch [list glob -nocomplain [lindex $volumeList 0]*]
} {0}
@@ -248,10 +248,6 @@ test cmdAH-8.3 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform unix
file dirname {}
} .
-test cmdAH-8.4 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- file dirname {}
-} :
test cmdAH-8.5 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform win
file dirname {}
@@ -260,10 +256,6 @@ test cmdAH-8.6 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform unix
file dirname .def
} .
-test cmdAH-8.7 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- file dirname a
-} :
test cmdAH-8.8 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform win
file dirname a
@@ -340,50 +332,6 @@ test cmdAH-8.26 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform windows
list [catch {file dirname {//foo/bar}} msg] $msg
} {0 //foo/bar}
-test cmdAH-8.27 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname :} msg] $msg
-} {0 :}
-test cmdAH-8.28 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname :Foo} msg] $msg
-} {0 :}
-test cmdAH-8.29 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname Foo:} msg] $msg
-} {0 Foo:}
-test cmdAH-8.30 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname Foo:bar} msg] $msg
-} {0 Foo:}
-test cmdAH-8.31 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname :Foo:bar} msg] $msg
-} {0 :Foo}
-test cmdAH-8.32 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname ::} msg] $msg
-} {0 :}
-test cmdAH-8.33 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname :::} msg] $msg
-} {0 ::}
-test cmdAH-8.34 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname /foo/bar/} msg] $msg
-} {0 foo:}
-test cmdAH-8.35 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname /foo/bar} msg] $msg
-} {0 foo:}
-test cmdAH-8.36 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname /foo} msg] $msg
-} {0 foo:}
-test cmdAH-8.37 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname foo} msg] $msg
-} {0 :}
test cmdAH-8.38 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform unix
list [catch {file dirname ~/foo} msg] $msg
@@ -392,18 +340,6 @@ test cmdAH-8.39 {Tcl_FileObjCmd: dirname} testsetplatform {
testsetplatform unix
list [catch {file dirname ~bar/foo} msg] $msg
} {0 ~bar}
-test cmdAH-8.40 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname ~bar/foo} msg] $msg
-} {0 ~bar:}
-test cmdAH-8.41 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname ~/foo} msg] $msg
-} {0 ~:}
-test cmdAH-8.42 {Tcl_FileObjCmd: dirname} testsetplatform {
- testsetplatform mac
- list [catch {file dirname ~:baz} msg] $msg
-} {0 ~:}
test cmdAH-8.43 {Tcl_FileObjCmd: dirname} testsetplatform {
global env
set temp $env(HOME)
@@ -431,15 +367,6 @@ test cmdAH-8.45 {Tcl_FileObjCmd: dirname} testsetplatform {
set env(HOME) $temp
set result
} {0 /homewontexist}
-test cmdAH-8.46 {Tcl_FileObjCmd: dirname} testsetplatform {
- global env
- set temp $env(HOME)
- set env(HOME) "/home/test"
- testsetplatform mac
- set result [list [catch {file dirname ~} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 home:}
# tail
@@ -455,10 +382,6 @@ test cmdAH-9.3 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform unix
file tail {}
} {}
-test cmdAH-9.4 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail {}
-} {}
test cmdAH-9.5 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform win
file tail {}
@@ -467,10 +390,6 @@ test cmdAH-9.6 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform unix
file tail .def
} .def
-test cmdAH-9.7 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail a
-} a
test cmdAH-9.8 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform win
file tail a
@@ -547,66 +466,6 @@ test cmdAH-9.26 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform windows
file tail {//foo/bar}
} {}
-test cmdAH-9.27 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail :
-} :
-test cmdAH-9.28 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail :Foo
-} Foo
-test cmdAH-9.29 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail Foo:
-} {}
-test cmdAH-9.30 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail Foo:bar
-} bar
-test cmdAH-9.31 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail :Foo:bar
-} bar
-test cmdAH-9.32 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail ::
-} ::
-test cmdAH-9.33 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail :::
-} ::
-test cmdAH-9.34 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail /foo/bar/
-} bar
-test cmdAH-9.35 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail /foo/bar
-} bar
-test cmdAH-9.36 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail /foo
-} {}
-test cmdAH-9.37 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail foo
-} foo
-test cmdAH-9.38 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail ~:foo
-} foo
-test cmdAH-9.39 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail ~bar:foo
-} foo
-test cmdAH-9.40 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail ~bar/foo
-} foo
-test cmdAH-9.41 {Tcl_FileObjCmd: tail} testsetplatform {
- testsetplatform mac
- file tail ~/foo
-} foo
test cmdAH-9.42 {Tcl_FileObjCmd: tail} testsetplatform {
global env
set temp $env(HOME)
@@ -634,15 +493,6 @@ test cmdAH-9.44 {Tcl_FileObjCmd: tail} testsetplatform {
set env(HOME) $temp
set result
} test
-test cmdAH-9.45 {Tcl_FileObjCmd: tail} testsetplatform {
- global env
- set temp $env(HOME)
- set env(HOME) "/home/test"
- testsetplatform mac
- set result [file tail ~]
- set env(HOME) $temp
- set result
-} test
test cmdAH-9.46 {Tcl_FileObjCmd: tail} testsetplatform {
testsetplatform unix
file tail {f.oo\bar/baz.bat}
@@ -710,54 +560,6 @@ test cmdAH-10.10 {Tcl_FileObjCmd: rootname} testsetplatform {
testsetplatform unix
file rootname a/b.c/
} a/b.c/
-test cmdAH-10.11 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file ro foo
-} foo
-test cmdAH-10.12 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname {}
-} {}
-test cmdAH-10.13 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname foo.
-} foo
-test cmdAH-10.14 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname .foo
-} {}
-test cmdAH-10.15 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname abc.def
-} abc
-test cmdAH-10.16 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname abc.def.ghi
-} abc.def
-test cmdAH-10.17 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname a:b:c.d
-} a:b:c
-test cmdAH-10.18 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname a:b.c:d
-} a:b.c:d
-test cmdAH-10.19 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname a/b/c.d
-} a/b/c
-test cmdAH-10.20 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname a/b.c/d
-} a/b.c/d
-test cmdAH-10.21 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname /a.b
-} /a
-test cmdAH-10.22 {Tcl_FileObjCmd: rootname} testsetplatform {
- testsetplatform mac
- file rootname foo.c:
-} foo.c:
test cmdAH-10.23 {Tcl_FileObjCmd: rootname} testsetplatform {
testsetplatform windows
file rootname {}
@@ -860,54 +662,6 @@ test cmdAH-11.10 {Tcl_FileObjCmd: extension} testsetplatform {
testsetplatform unix
file extension a/b.c/
} {}
-test cmdAH-11.11 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file ext foo
-} {}
-test cmdAH-11.12 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension {}
-} {}
-test cmdAH-11.13 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension foo.
-} .
-test cmdAH-11.14 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension .foo
-} .foo
-test cmdAH-11.15 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension abc.def
-} .def
-test cmdAH-11.16 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension abc.def.ghi
-} .ghi
-test cmdAH-11.17 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension a:b:c.d
-} .d
-test cmdAH-11.18 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension a:b.c:d
-} {}
-test cmdAH-11.19 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension a/b/c.d
-} .d
-test cmdAH-11.20 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension a/b.c/d
-} {}
-test cmdAH-11.21 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension /a.b
-} .b
-test cmdAH-11.22 {Tcl_FileObjCmd: extension} testsetplatform {
- testsetplatform mac
- file extension foo.c:
-} {}
test cmdAH-11.23 {Tcl_FileObjCmd: extension} testsetplatform {
testsetplatform windows
file extension {}
@@ -958,7 +712,7 @@ test cmdAH-11.34 {Tcl_FileObjCmd: extension} testsetplatform {
} {}
set num 35
foreach value {a..b a...b a.c..b ..b} result {.b .b .b .b} {
- foreach p {unix mac windows} {
+ foreach p {unix windows} {
; test cmdAH-11.$num {Tcl_FileObjCmd: extension} testsetplatform "
testsetplatform $p
file extension $value
@@ -1088,13 +842,6 @@ test cmdAH-18.3 {Tcl_FileObjCmd: executable} {unixOnly testchmod} {
file exe $gorpfile
} 1
-test cmdAH-18.4 {Tcl_FileObjCmd: executable} {macOnly testchmod} {
- # On mac, the only executable files are of type APPL.
-
- set x [file exe $gorpfile]
- file attrib $gorpfile -type APPL
- lappend x [file exe $gorpfile]
-} {0 1}
test cmdAH-18.5 {Tcl_FileObjCmd: executable} {winOnly testchmod} {
# On pc, must be a .exe, .com, etc.
@@ -1145,10 +892,6 @@ test cmdAH-19.7 {Tcl_FileObjCmd: nativename} testsetplatform {
testsetplatform windows
list [catch {file nativename a/b} msg] $msg [testsetplatform $platform]
} {0 {a\b} {}}
-test cmdAH-19.8 {Tcl_FileObjCmd: nativename} testsetplatform {
- testsetplatform mac
- list [catch {file nativename a/b} msg] $msg [testsetplatform $platform]
-} {0 :a:b {}}
test cmdAH-19.9 {Tcl_FileObjCmd: ~ : exists} {
file exists ~nOsUcHuSeR
@@ -1409,14 +1152,14 @@ test cmdAH-24.5 {Tcl_FileObjCmd: mtime} {
test cmdAH-24.7 {Tcl_FileObjCmd: mtime} {
list [catch {file mtime $file notint} msg] $msg
} {1 {expected integer but got "notint"}}
-test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} macOrUnix {
+test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} unixOnly {
set mtime [file mtime $file]
after 1100; # pause a sec to notice change in mtime
set newmtime [clock seconds]
set modmtime [file mtime $file $newmtime]
expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"}
} 1
-test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} macOrUnix {
+test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} unixOnly {
set oldfile $file
# introduce some non-ascii characters.
append file \u2022
@@ -1492,10 +1235,6 @@ test cmdAH-26.3 {Tcl_FileObjCmd: readlink errors} {unixOnly nonPortable} {
list [catch {file readlink _bogus_} msg] [string tolower $msg] \
[string tolower $errorCode]
} {1 {could not readlink "_bogus_": no such file or directory} {posix enoent {no such file or directory}}}
-test cmdAH-26.4 {Tcl_FileObjCmd: readlink errors} {macOnly nonPortable} {
- list [catch {file readlink _bogus_} msg] [string tolower $msg] \
- [string tolower $errorCode]
-} {1 {could not readlink "_bogus_": no such file or directory} {posix enoent {no such file or directory}}}
test cmdAH-26.5 {Tcl_FileObjCmd: readlink errors} {winOnly nonPortable} {
list [catch {file readlink _bogus_} msg] [string tolower $msg] \
[string tolower $errorCode]
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 50218de..5adfeec 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdMZ.test,v 1.20 2004/02/25 23:56:59 dgp Exp $
+# RCS: @(#) $Id: cmdMZ.test,v 1.21 2004/03/17 18:14:17 das Exp $
if {[catch {package require tcltest 2.1}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.1 required."
@@ -187,12 +187,6 @@ foreach script {
# Tcl_SourceObjCmd
# More tests of Tcl_SourceObjCmd are in source.test
-test cmdMZ-3.1 {Tcl_SourceObjCmd: error conditions} {macOnly} {
- list [catch {source} msg] $msg
-} {1 {wrong # args: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}}
-test cmdMZ-3.2 {Tcl_SourceObjCmd: error conditions} {macOnly} {
- list [catch {source a b} msg] $msg
-} {1 {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}}
test cmdMZ-3.3 {Tcl_SourceObjCmd: error conditions} -constraints {
unixOrPc
} -body {
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 9be033c..9e1b3e6 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fCmd.test,v 1.37 2004/01/26 13:33:59 vincentdarley Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.38 2004/03/17 18:14:17 das Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -69,11 +69,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 {
@@ -99,16 +95,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"} {
@@ -300,10 +286,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]
@@ -320,9 +302,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
@@ -439,11 +418,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
@@ -767,20 +741,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 {
@@ -796,12 +768,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 {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
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 {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
set w2 [file writable tds2]
} else {
set w2 0
@@ -824,12 +796,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 {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
testchmod 555 td2
}
file rename td1 [file join td3 td3]
file rename td2 [file join td3 td4]
- if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} {
+ if {$tcl_platform(platform) != "unix"} {
set w4 [file writable [file join td3 td4]]
} else {
set w4 0
@@ -840,16 +812,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} {
cleanup
file mkdir [file join td1 td2] [file join td2 td1]
- if {$tcl_platform(platform) != "macintosh"} {
- testchmod 555 [file join td2 td1]
- }
+ 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]
- }
+ 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} {
@@ -924,10 +892,8 @@ test fCmd-10.3 {file copy: comprehensive: dir to new name} {notRoot unixOrPc tes
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
- }
+ 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.4 {file copy: comprehensive: file to existing file} {notRoot testchmod} {
@@ -965,12 +931,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]
- }
+ 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}]
@@ -1678,7 +1642,7 @@ test fCmd-18.5 {TclFileRenameCmd: attempt to replace dir with non-dir} {notRoot}
#
# On Windows there is no easy way to determine if two files are the same
#
-test fCmd-18.6 {TclFileRenameCmd: rename a file to itself} {macOrUnix notRoot} {
+test fCmd-18.6 {TclFileRenameCmd: rename a file to itself} {unixOnly notRoot} {
catch {file delete -force -- tfa}
set s [createfile tfa]
set r1 [catch {file rename tfa tfa}]
@@ -2020,7 +1984,7 @@ test fCmd-22.1 {TclpRenameFile: rename and overwrite in a single dir} {notRoot}
set result
} {1}
-test fCmd-22.2 {TclpRenameFile: attempt to overwrite itself} {macOrUnix notRoot} {
+test fCmd-22.2 {TclpRenameFile: attempt to overwrite itself} {unixOnly notRoot} {
catch {file delete -force -- tfa1}
set s [createfile tfa1]
file rename -force tfa1 tfa1
@@ -2267,7 +2231,7 @@ test fCmd-28.5 {file link: source already exists} {linkDirectory} {
set res
} {1 {could not create new link "abc.dir": that path already exists}}
-test fCmd-28.6 {file link: unsupported operation} {linkDirectory macOrWin} {
+test fCmd-28.6 {file link: unsupported operation} {linkDirectory winOnly} {
cd [temporaryDirectory]
set res [list [catch {file link -hard abc.link abc.dir} msg] $msg]
cd [workingDirectory]
diff --git a/tests/fileName.test b/tests/fileName.test
index 181be16..be6b6d7 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fileName.test,v 1.37 2004/03/09 12:54:02 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.38 2004/03/17 18:14:17 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -66,115 +66,6 @@ test filename-1.8 {Tcl_GetPathType: unix} {testsetplatform} {
file pathtype ./~foo
} relative
-test filename-2.1 {Tcl_GetPathType: mac, denerate names} {testsetplatform} {
- testsetplatform mac
- file pathtype /
-} relative
-test filename-2.2 {Tcl_GetPathType: mac, denerate names} {testsetplatform} {
- testsetplatform mac
- file pathtype /.
-} relative
-test filename-2.3 {Tcl_GetPathType: mac, denerate names} {testsetplatform} {
- testsetplatform mac
- file pathtype /..
-} relative
-test filename-2.4 {Tcl_GetPathType: mac, denerate names} {testsetplatform} {
- testsetplatform mac
- file pathtype //.//
-} relative
-test filename-2.5 {Tcl_GetPathType: mac, denerate names} {testsetplatform} {
- testsetplatform mac
- file pathtype //.//../.
-} relative
-test filename-2.6 {Tcl_GetPathType: mac, tilde names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~
-} absolute
-test filename-2.7 {Tcl_GetPathType: mac, tilde names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~:
-} absolute
-test filename-2.8 {Tcl_GetPathType: mac, tilde names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~:foo
-} absolute
-test filename-2.9 {Tcl_GetPathType: mac, tilde names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~/
-} absolute
-test filename-2.10 {Tcl_GetPathType: mac, tilde names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~/foo
-} absolute
-test filename-2.11 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype /foo
-} absolute
-test filename-2.12 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype /./foo
-} absolute
-test filename-2.13 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype /..//./foo
-} absolute
-test filename-2.14 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype /foo/bar
-} absolute
-test filename-2.15 {Tcl_GetPathType: mac, unix-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype foo/bar
-} relative
-test filename-2.16 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype :
-} relative
-test filename-2.17 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype :foo
-} relative
-test filename-2.18 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype foo:
-} absolute
-test filename-2.19 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype foo:bar
-} absolute
-test filename-2.20 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype :foo:bar
-} relative
-test filename-2.21 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype ::foo:bar
-} relative
-test filename-2.22 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~foo
-} absolute
-test filename-2.23 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype :~foo
-} relative
-test filename-2.24 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype ~foo:
-} absolute
-test filename-2.25 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype foo/bar:
-} absolute
-test filename-2.26 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype /foo:
-} absolute
-test filename-2.27 {Tcl_GetPathType: mac, mac-style names} {testsetplatform} {
- testsetplatform mac
- file pathtype foo
-} relative
-
test filename-3.1 {Tcl_GetPathType: windows} {testsetplatform} {
testsetplatform windows
file pathtype /
@@ -343,211 +234,6 @@ test filename-4.19 {Tcl_SplitPath} {
list $res $err
} {0 tildetmp/~tilde}
-test filename-5.1 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:b
-} {a: b}
-test filename-5.2 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:b:c
-} {a: b c}
-test filename-5.3 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:b:c:
-} {a: b c}
-test filename-5.4 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:
-} {a:}
-test filename-5.5 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a::
-} {a: ::}
-test filename-5.6 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:::
-} {a: :: ::}
-test filename-5.7 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split :a
-} {a}
-test filename-5.8 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split :a::
-} {a ::}
-test filename-5.9 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split :
-} {:}
-test filename-5.10 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ::
-} {::}
-test filename-5.11 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split :::
-} {:: ::}
-test filename-5.12 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:::b
-} {a: :: :: b}
-test filename-5.13 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /a:b
-} {/a: b}
-test filename-5.14 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~:
-} {~:}
-test filename-5.15 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~/:
-} {~/:}
-test filename-5.16 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~:foo
-} {~: foo}
-test filename-5.17 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~/foo
-} {~: foo}
-test filename-5.18 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~foo:
-} {~foo:}
-test filename-5.19 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:~foo
-} {a: :~foo}
-test filename-5.20 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /
-} {:/}
-test filename-5.21 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a:b/c
-} {a: :b/c}
-test filename-5.22 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /foo
-} {foo:}
-test filename-5.23 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /a/b
-} {a: b}
-test filename-5.24 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /a/b/foo
-} {a: b foo}
-test filename-5.25 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a/b
-} {a b}
-test filename-5.26 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ./foo/bar
-} {: foo bar}
-test filename-5.27 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ../foo/bar
-} {:: foo bar}
-test filename-5.28 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split {}
-} {}
-test filename-5.29 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split .
-} {:}
-test filename-5.30 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ././
-} {: :}
-test filename-5.31 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ././.
-} {: : :}
-test filename-5.32 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ../
-} {::}
-test filename-5.33 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ..
-} {::}
-test filename-5.34 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ../..
-} {:: ::}
-test filename-5.35 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split //foo
-} {foo:}
-test filename-5.36 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split foo//bar
-} {foo bar}
-test filename-5.37 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~foo
-} {~foo:}
-test filename-5.38 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~
-} {~:}
-test filename-5.39 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split foo
-} {foo}
-test filename-5.40 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~/
-} {~:}
-test filename-5.41 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~foo/~bar
-} {~foo: :~bar}
-test filename-5.42 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split ~foo/~bar/~baz
-} {~foo: :~bar :~baz}
-test filename-5.43 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split foo/bar~/baz
-} {foo bar~ baz}
-test filename-5.44 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a/../b
-} {a :: b}
-test filename-5.45 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a/../../b
-} {a :: :: b}
-test filename-5.46 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split a/.././../b
-} {a :: : :: b}
-test filename-5.47 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /../bar
-} {bar:}
-test filename-5.48 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /./bar
-} {bar:}
-test filename-5.49 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split //.//.././bar
-} {bar:}
-test filename-5.50 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split /..
-} {:/..}
-test filename-5.51 {Tcl_SplitPath: mac} {testsetplatform} {
- testsetplatform mac
- file split //.//.././
-} {://.//.././}
-
test filename-6.1 {Tcl_SplitPath: win} {testsetplatform} {
testsetplatform win
file split /
@@ -742,94 +428,6 @@ test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} {
file join /// a b
} {/a/b}
-test filename-8.1 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a b
-} {:a:b}
-test filename-8.2 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join :a b
-} {:a:b}
-test filename-8.3 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a b:
-} {b:}
-test filename-8.4 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a: :b
-} {a:b}
-test filename-8.5 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a: :b:
-} {a:b}
-test filename-8.6 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a :: b
-} {:a::b}
-test filename-8.7 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a :: :: b
-} {:a:::b}
-test filename-8.8 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a ::: b
-} {:a:::b}
-test filename-8.9 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a: b:
-} {b:}
-test filename-8.10 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join /a/b
-} {a:b}
-test filename-8.11 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join /a/b c/d
-} {a:b:c:d}
-test filename-8.12 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join /a/b :c:d
-} {a:b:c:d}
-test filename-8.13 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join ~ foo
-} {~:foo}
-test filename-8.14 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join :: ::
-} {:::}
-test filename-8.15 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a: ::
-} {a::}
-test filename-8.16 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a {} b
-} {:a:b}
-test filename-8.17 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a::: b
-} {a:::b}
-test filename-8.18 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a : : :
-} {:a}
-test filename-8.19 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join :
-} {:}
-test filename-8.20 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join : a
-} {:a}
-test filename-8.21 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join a: :b/c
-} {a:b/c}
-test filename-8.22 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- file join :a :b/c
-} {:a:b/c}
test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} {
testsetplatform win
@@ -940,22 +538,6 @@ test filename-9.20 {Tcl_JoinPath: unix} {testsetplatform} {
[file join /x {/foo/bar}] \
[file join /x /x {/foo/bar}]
} {/foo/bar /foo/bar /foo/bar}
-test filename-9.21 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- set res {}
- lappend res \
- [file join {/foo/bar}] \
- [file join drive: {/foo/bar}] \
- [file join drive: drive: {/foo/bar}]
-} {foo:bar foo:bar foo:bar}
-test filename-9.22 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- set res {}
- lappend res \
- [file join {foo:bar}] \
- [file join drive: {foo:bar}] \
- [file join drive: drive: {foo:bar}]
-} {foo:bar foo:bar foo:bar}
test filename-9.23 {Tcl_JoinPath: win} {testsetplatform} {
testsetplatform win
set res {}
@@ -974,24 +556,6 @@ test filename-9.24 {Tcl_JoinPath: unix} {testsetplatform} {
[file join /x /x {foo/bar}]
string map [list /x ""] $res
} {foo/bar /foo/bar /foo/bar}
-test filename-9.25 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- set res {}
- lappend res \
- [file join {foo/bar}] \
- [file join drive: {foo/bar}] \
- [file join drive: drive: {foo/bar}]
- string map [list drive: ""] $res
-} {:foo:bar foo:bar foo:bar}
-test filename-9.26 {Tcl_JoinPath: mac} {testsetplatform} {
- testsetplatform mac
- set res {}
- lappend res \
- [file join {:foo:bar}] \
- [file join drive: {:foo:bar}] \
- [file join drive: drive: {:foo:bar}]
- string map [list drive: ""] $res
-} {:foo:bar foo:bar foo:bar}
test filename-10.1 {Tcl_TranslateFileName} {testsetplatform} {
testsetplatform unix
@@ -1009,14 +573,6 @@ test filename-10.3.1 {Tcl_TranslateFileName} {testsetplatform} {
testsetplatform windows
list [catch {testtranslatefilename {c://///}} msg] $msg
} {0 c:\\}
-test filename-10.4 {Tcl_TranslateFileName} {testsetplatform} {
- testsetplatform mac
- list [catch {testtranslatefilename foo} msg] $msg
-} {0 :foo}
-test filename-10.5 {Tcl_TranslateFileName} {testsetplatform} {
- testsetplatform mac
- list [catch {testtranslatefilename :~foo} msg] $msg
-} {0 :~foo}
test filename-10.6 {Tcl_TranslateFileName} {testsetplatform} {
global env
set temp $env(HOME)
@@ -1062,60 +618,6 @@ test filename-10.10 {Tcl_TranslateFileName} {testsetplatform} {
set env(HOME) $temp
set result
} {0 /home/test/foo}
-test filename-10.11 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~/foo} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:foo}
-test filename-10.12 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:home"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~/foo} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:home:foo}
-test filename-10.13 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:home"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~::foo} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:home::foo}
-test filename-10.14 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:home"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:home}
-test filename-10.15 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:home:"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~::foo} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:home::foo}
-test filename-10.16 {Tcl_TranslateFileName} {testsetplatform} {
- global env
- set temp $env(HOME)
- set env(HOME) "Root:home::"
- testsetplatform mac
- set result [list [catch {testtranslatefilename ~::foo} msg] $msg]
- set env(HOME) $temp
- set result
-} {0 Root:home:::foo}
test filename-10.17 {Tcl_TranslateFileName} {testsetplatform} {
global env
set temp $env(HOME)
@@ -1267,7 +769,7 @@ test filename-11.17 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.17.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.17.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -directory $globname *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
[file join $globname .1]\
@@ -1397,7 +899,7 @@ test filename-11.18 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.18.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.18.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -path $globname/ *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
[file join $globname .1]\
@@ -1415,7 +917,7 @@ test filename-11.19 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.19.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.19.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -join -path \
[string range $globname 0 5] * *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
@@ -1457,7 +959,7 @@ test filename-11.22 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.22.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.22.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -dir $globname *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
[file join $globname .1]\
@@ -1474,7 +976,7 @@ test filename-11.23 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.23.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.23.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -path $globname/ *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
[file join $globname .1]\
@@ -1492,7 +994,7 @@ test filename-11.24 {Tcl_GlobCmd} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-11.24.1 {Tcl_GlobCmd} {pcOnly macOnly} {
+test filename-11.24.1 {Tcl_GlobCmd} {pcOnly} {
list [catch {lsort [glob -join -path \
[string range $globname 0 5] * *]} msg] $msg
} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\
@@ -1636,27 +1138,11 @@ test filename-12.1.5 {simple globbing} {pcOnly} {
test filename-12.1.6 {simple globbing} {pcOnly} {
list [catch {glob c:/} msg] $msg
} {0 c:/}
-test filename-12.2 {simple globbing} {macOnly} {
- list [catch {glob {}} msg] $msg
-} {0 :}
-test filename-12.2.1 {simple globbing} {macOnly} {
- list [catch {glob -types f {}} msg] $msg
-} {1 {no files matched glob pattern ""}}
-test filename-12.2.2 {simple globbing} {macOnly} {
- list [catch {glob -types d {}} msg] $msg
-} {0 :}
-test filename-12.2.3 {simple globbing} {macOnly} {
- list [catch {glob -types hidden {}} msg] $msg
-} {1 {no files matched glob pattern ""}}
test filename-12.3 {simple globbing} {
list [catch {glob -nocomplain \{a1,a2\}} msg] $msg
} {0 {}}
-if {$tcl_platform(platform) == "macintosh"} {
- set globPreResult :globTest:
-} else {
- set globPreResult globTest/
-}
+set globPreResult globTest/
set x1 x1.c
set y1 y1.c
test filename-12.4 {simple globbing} {unixOrPc} {
@@ -1733,36 +1219,21 @@ test filename-13.10 {globbing with brace substitution} {
test filename-13.11 {globbing with brace substitution} {unixOrPc} {
list [lsort [catch {glob globTest/\{x,x\\,z,z\}1.c} msg]] $msg
} {0 {globTest/x1.c globTest/x,z1.c globTest/z1.c}}
-test filename-13.12 {globbing with brace substitution} {macOnly} {
- list [lsort [catch {glob globTest/\{x,x\\,z,z\}1.c} msg]] $msg
-} {0 {:globTest:x1.c :globTest:x,z1.c :globTest:z1.c}}
test filename-13.13 {globbing with brace substitution} {
lsort [glob globTest/{a,b,x,y}1.c]
} [list $globPreResult$x1 $globPreResult$y1]
test filename-13.14 {globbing with brace substitution} {unixOrPc} {
lsort [glob {globTest/{x1,y2,weird name}.c}]
} {{globTest/weird name.c} globTest/x1.c}
-test filename-13.15 {globbing with brace substitution} {macOnly} {
- lsort [glob {globTest/{x1,y2,weird name}.c}]
-} {{:globTest:weird name.c} :globTest:x1.c}
test filename-13.16 {globbing with brace substitution} {unixOrPc} {
lsort [glob globTest/{x1.c,a1/*}]
} {globTest/a1/b1 globTest/a1/b2 globTest/x1.c}
-test filename-13.17 {globbing with brace substitution} {macOnly} {
- lsort [glob globTest/{x1.c,a1/*}]
-} {:globTest:a1:b1 :globTest:a1:b2 :globTest:x1.c}
test filename-13.18 {globbing with brace substitution} {unixOrPc} {
lsort [glob globTest/{x1.c,{a},a1/*}]
} {globTest/a1/b1 globTest/a1/b2 globTest/x1.c}
-test filename-13.19 {globbing with brace substitution} {macOnly} {
- lsort [glob globTest/{x1.c,{a},a1/*}]
-} {:globTest:a1:b1 :globTest:a1:b2 :globTest:x1.c}
test filename-13.20 {globbing with brace substitution} {unixOrPc} {
lsort [glob globTest/{a,x}1/*/{x,y}*]
} {globTest/a1/b1/x2.c globTest/a1/b2/y2.c}
-test filename-13.21 {globbing with brace substitution} {macOnly} {
- lsort [glob globTest/{a,x}1/*/{x,y}*]
-} {:globTest:a1:b1:x2.c :globTest:a1:b2:y2.c}
test filename-13.22 {globbing with brace substitution} {
list [catch {glob globTest/\{a,x\}1/*/\{} msg] $msg
} {1 {unmatched open-brace in file name}}
@@ -1770,15 +1241,9 @@ test filename-13.22 {globbing with brace substitution} {
test filename-14.1 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob glo*/*.c]
} {{globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c}
-test filename-14.2 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob glo*/*.c]
-} {{:globTest:weird name.c} :globTest:x,z1.c :globTest:x1.c :globTest:y1.c :globTest:z1.c}
test filename-14.3 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob globTest/?1.c]
} {globTest/x1.c globTest/y1.c globTest/z1.c}
-test filename-14.4 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob globTest/?1.c]
-} {:globTest:x1.c :globTest:y1.c :globTest:z1.c}
# The current directory could be anywhere; do this to stop spurious matches
file mkdir globTestContext
@@ -1789,9 +1254,6 @@ cd globTestContext
test filename-14.5 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob */*/*/*.c]
} {globTest/a1/b1/x2.c globTest/a1/b2/y2.c}
-test filename-14.6 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob */*/*/*.c]
-} {:globTest:a1:b1:x2.c :globTest:a1:b2:y2.c}
# Reset to where we were
cd $savepwd
@@ -1804,33 +1266,18 @@ test filename-14.7 {asterisks, question marks, and brackets} {unixOnly} {
test filename-14.7.1 {asterisks, question marks, and brackets} {pcOnly} {
lsort [glob globTest/*]
} {globTest/.1 globTest/a1 globTest/a2 globTest/a3 {globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c}
-test filename-14.8 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob globTest/*]
-} {:globTest:.1 :globTest:a1 :globTest:a2 :globTest:a3 {:globTest:weird name.c} :globTest:x,z1.c :globTest:x1.c :globTest:y1.c :globTest:z1.c}
test filename-14.9 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob globTest/.*]
} {globTest/. globTest/.. globTest/.1}
-test filename-14.10 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob globTest/.*]
-} {:globTest:.1}
test filename-14.11 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob globTest/*/*]
} {globTest/a1/b1 globTest/a1/b2 globTest/a2/b3}
-test filename-14.12 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob globTest/*/*]
-} {:globTest:a1:b1 :globTest:a1:b2 :globTest:a2:b3}
test filename-14.13 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob {globTest/[xyab]1.*}]
} {globTest/x1.c globTest/y1.c}
-test filename-14.14 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob {globTest/[xyab]1.*}]
-} {:globTest:x1.c :globTest:y1.c}
test filename-14.15 {asterisks, question marks, and brackets} {unixOrPc} {
lsort [glob globTest/*/]
} {globTest/a1/ globTest/a2/ globTest/a3/}
-test filename-14.16 {asterisks, question marks, and brackets} {macOnly} {
- lsort [glob globTest/*/]
-} {:globTest:a1: :globTest:a2: :globTest:a3:}
test filename-14.17 {asterisks, question marks, and brackets} {
global env
set temp $env(HOME)
@@ -1842,9 +1289,6 @@ test filename-14.17 {asterisks, question marks, and brackets} {
test filename-14.18 {asterisks, question marks, and brackets} {unixOrPc} {
list [catch {lsort [glob globTest/*.c goo/*]} msg] $msg
} {0 {{globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c}}
-test filename-14.19 {asterisks, question marks, and brackets} {macOnly} {
- list [catch {lsort [glob globTest/*.c goo/*]} msg] $msg
-} {0 {{:globTest:weird name.c} :globTest:x,z1.c :globTest:x1.c :globTest:y1.c :globTest:z1.c}}
test filename-14.20 {asterisks, question marks, and brackets} {
list [catch {glob -nocomplain goo/*} msg] $msg
} {0 {}}
@@ -1867,7 +1311,7 @@ test filename-14.25 {type specific globbing} {unixOnly} {
[file join $globname x,z1.c]\
[file join $globname x1.c]\
[file join $globname y1.c] [file join $globname z1.c]]]]
-test filename-14.25.1 {type specific globbing} {pcOnly macOnly} {
+test filename-14.25.1 {type specific globbing} {pcOnly} {
list [catch {lsort [glob -dir globTest -types f *]} msg] $msg
} [list 0 [lsort [list \
[file join $globname .1]\
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index c53d23c..964f201 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -89,7 +89,7 @@ test filesystem-1.1 {link normalisation} {hasLinks} {
string equal [file normalize dir.dir] [file normalize dir.link]
} {0}
-test filesystem-1.2 {link normalisation} {hasLinks macOrUnix} {
+test filesystem-1.2 {link normalisation} {hasLinks unixOnly} {
testPathEqual [file normalize [file join gorp.file foo]] \
[file normalize [file join link.file foo]]
} {1}
@@ -114,7 +114,7 @@ test filesystem-1.6 {link normalisation} {hasLinks} {
[file normalize [file join dir.link inside.file]]
} {0}
-test filesystem-1.7 {link normalisation} {hasLinks macOrUnix} {
+test filesystem-1.7 {link normalisation} {hasLinks unixOnly} {
testPathEqual [file normalize [file join dir.link linkinside.file foo]] \
[file normalize [file join dir.dir inside.file foo]]
} {1}
@@ -124,14 +124,14 @@ test filesystem-1.8 {link normalisation} {hasLinks} {
[file normalize [file join dir.link inside.filefoo]]
} {0}
-test filesystem-1.9 {link normalisation} {macOrUnix hasLinks} {
+test filesystem-1.9 {link normalisation} {unixOnly hasLinks} {
file delete -force dir.link
file link dir.link [file nativename dir.dir]
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir.link inside.file foo]]
} {1}
-test filesystem-1.10 {link normalisation: double link} {macOrUnix hasLinks} {
+test filesystem-1.10 {link normalisation: double link} {unixOnly hasLinks} {
file link dir2.link dir.link
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir2.link inside.file foo]]
@@ -139,7 +139,7 @@ test filesystem-1.10 {link normalisation: double link} {macOrUnix hasLinks} {
makeDirectory dir2.file
-test filesystem-1.11 {link normalisation: double link, back in tree} {macOrUnix hasLinks} {
+test filesystem-1.11 {link normalisation: double link, back in tree} {unixOnly hasLinks} {
file link [file join dir2.file dir2.link] [file join .. dir2.link]
testPathEqual [file normalize [file join dir.dir linkinside.file foo]] \
[file normalize [file join dir2.file dir2.link inside.file foo]]
diff --git a/tests/interp.test b/tests/interp.test
index 9cace24..83356af 100644
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -10,20 +10,14 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: interp.test,v 1.25 2003/11/14 20:44:46 dgp Exp $
+# RCS: @(#) $Id: interp.test,v 1.26 2004/03/17 18:14:17 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
namespace import -force ::tcltest::*
}
-# The set of hidden commands is platform dependent:
-
-if {"$tcl_platform(platform)" == "macintosh"} {
- set hidden_cmds {beep cd echo encoding exit fconfigure file glob load ls open pwd socket source}
-} else {
- set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket source}
-}
+set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket source}
foreach i [interp slaves] {
interp delete $i
@@ -1743,24 +1737,6 @@ test interp-23.2 {testing hiding vs aliases} {unixOrPc} {
set l
} {{cd encoding exec exit fconfigure file glob load open pwd socket source} bar {cd encoding exec exit fconfigure file glob load open pwd socket source} bar {bar cd encoding exec exit fconfigure file glob load open pwd socket source} {} {cd encoding exec exit fconfigure file glob load open pwd socket source}}
-test interp-23.3 {testing hiding vs aliases} {macOnly} {
- catch {interp delete a}
- interp create a -safe
- set l ""
- lappend l [lsort [interp hidden a]]
- a alias bar bar
- lappend l [interp aliases a]
- lappend l [lsort [interp hidden a]]
- a hide bar
- lappend l [interp aliases a]
- lappend l [lsort [interp hidden a]]
- a alias bar {}
- lappend l [interp aliases a]
- lappend l [lsort [interp hidden a]]
- interp delete a
- set l
-} {{beep cd echo encoding exit fconfigure file glob load ls open pwd socket source} bar {beep cd echo encoding exit fconfigure file glob load ls open pwd socket source} bar {bar beep cd echo encoding exit fconfigure file glob load ls open pwd socket source} {} {beep cd echo encoding exit fconfigure file glob load ls open pwd socket source}}
-
test interp-24.1 {result resetting on error} {
catch {interp delete a}
interp create a
diff --git a/tests/io.test b/tests/io.test
index 8fe80fd..c64298e 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: io.test,v 1.49 2004/02/25 23:56:59 dgp Exp $
+# RCS: @(#) $Id: io.test,v 1.50 2004/03/17 18:14:17 das Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
@@ -1550,11 +1550,7 @@ test io-13.12 {TranslateInputEOL: find EOF char in src} {
# also testing channel table management.
if {[info commands testchannel] != ""} {
- if {$tcl_platform(platform) == "macintosh"} {
- set consoleFileNames [list console0 console1 console2]
- } else {
- set consoleFileNames [lsort [testchannel open]]
- }
+ set consoleFileNames [lsort [testchannel open]]
} else {
# just to avoid an error
set consoleFileNames [list]
@@ -1871,12 +1867,6 @@ test io-20.3 {Tcl_CreateChannel: initial settings} {unixOnly} {
close $f
set x
} {{{} {}} {auto lf}}
-test io-20.4 {Tcl_CreateChannel: initial settings} {macOnly} {
- set f [open $path(test1) w+]
- set x [list [fconfigure $f -eofchar] [fconfigure $f -translation]]
- close $f
- set x
-} {{{} {}} {auto cr}}
set path(stdout) [makeFile {} stdout]
@@ -5252,7 +5242,7 @@ test io-40.8 {POSIX open access modes: TRUNC} {
close $f
set x
} abc
-test io-40.9 {POSIX open access modes: NONBLOCK} {nonPortable macOrUnix} {
+test io-40.9 {POSIX open access modes: NONBLOCK} {nonPortable unixOnly} {
file delete $path(test3)
set f [open $path(test3) {WRONLY NONBLOCK CREAT}]
puts $f "NONBLOCK test"
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 63f9895..880de35 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioCmd.test,v 1.19 2003/10/07 21:45:39 dgp Exp $
+# RCS: @(#) $Id: ioCmd.test,v 1.20 2004/03/17 18:14:18 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -287,12 +287,6 @@ proc iocmdSSHTDWN {} {
}
}
-test iocmd-8.15.0 {fconfigure command / tcp channel} {socket macOnly} {
- iocmdSSETUP
- set r [list [catch {fconfigure $cli -blah} msg] $msg]
- iocmdSSHTDWN
- set r
-} {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -error, -peername, or -sockname}}
test iocmd-8.15.1 {fconfigure command / tcp channel} {socket unixOrPc} {
iocmdSSETUP
set r [list [catch {fconfigure $cli -blah} msg] $msg]
diff --git a/tests/load.test b/tests/load.test
index bd480b9..4869d7b 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: load.test,v 1.11 2003/02/01 23:37:29 kennykb Exp $
+# RCS: @(#) $Id: load.test,v 1.12 2004/03/17 18:14:18 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -20,12 +20,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# Figure out what extension is used for shared libraries on this
# platform.
-if {$tcl_platform(platform) == "macintosh"} {
- puts "can't run dynamic library tests on macintosh machines"
- ::tcltest::cleanupTests
- return
-}
-
# Tests require the existence of one of the DLLs in the dltest directory.
set ext [info sharedlibextension]
set testDir [file join [file dirname [info nameofexecutable]] dltest]
diff --git a/tests/macFCmd.test b/tests/macFCmd.test
deleted file mode 100644
index f50e7b9..0000000
--- a/tests/macFCmd.test
+++ /dev/null
@@ -1,204 +0,0 @@
-# This file tests the tclfCmd.c file.
-#
-# This file contains a collection of tests for one or more of the Tcl
-# built-in commands. Sourcing this file into Tcl runs the tests and
-# generates output for errors. No output means no errors were found.
-#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: macFCmd.test,v 1.11 2003/05/14 19:21:24 das Exp $
-#
-
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
- namespace import -force ::tcltest::*
-}
-
-# These tests really need to be run from a writable directory, which
-# it is assumed [temporaryDirectory] is.
-set oldcwd [pwd]
-cd [temporaryDirectory]
-
-catch {file delete -force foo.dir}
-file mkdir foo.dir
-if {[catch {file attributes foo.dir -readonly 1}]} {
- set ::tcltest::testConstraints(fileSharing) 0
- set ::tcltest::testConstraints(notFileSharing) 1
-} else {
- set ::tcltest::testConstraints(fileSharing) 1
- set ::tcltest::testConstraints(notFileSharing) 0
- file attributes foo.dir -readonly 0
-}
-file delete -force foo.dir
-
-test macFCmd-1.1 {GetFileFinderAttributes - no file} {macOnly} {
- catch {file delete -force foo.file}
- list [catch {file attributes foo.file -creator} msg] $msg
-} {1 {could not read "foo.file": no such file or directory}}
-test macFCmd-1.2 {GetFileFinderAttributes - creator} {macOnly} {
- catch {file delete -force foo.file}
- catch {close [open foo.file w]}
- list [catch {file attributes foo.file -creator} msg] \
- [regexp {MPW |CWIE} $msg] [file delete -force foo.file]
-} {0 1 {}}
-test macFCmd-1.3 {GetFileFinderAttributes - type} {macOnly} {
- catch {file delete -force foo.file}
- catch {close [open foo.file w]}
- list [catch {file attributes foo.file -type} msg] $msg \
- [file delete -force foo.file]
-} {0 TEXT {}}
-test macFCmd-1.4 {GetFileFinderAttributes - not hidden} {macOnly} {
- catch {file delete -force foo.file}
- catch {close [open foo.file w]}
- list [catch {file attributes foo.file -hidden} msg] $msg \
- [file delete -force foo.file]
-} {0 0 {}}
-test macFCmd-1.5 {GetFileFinderAttributes - hidden} {macOnly} {
- catch {file delete -force foo.file}
- catch {close [open foo.file w]}
- file attributes foo.file -hidden 1
- list [catch {file attributes foo.file -hidden} msg] $msg \
- [file delete -force foo.file]
-} {0 1 {}}
-test macFCmd-1.6 {GetFileFinderAttributes - folder creator} {macOnly} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -creator} msg] $msg \
- [file delete -force foo.dir]
-} {0 Fldr {}}
-test macFCmd-1.7 {GetFileFinderAttributes - folder type} {macOnly} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -type} msg] $msg \
- [file delete -force foo.dir]
-} {0 Fldr {}}
-test macFCmd-1.8 {GetFileFinderAttributes - folder hidden} {macOnly} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -hidden} msg] $msg \
- [file delete -force foo.dir]
-} {0 0 {}}
-
-test macFCmd-2.1 {GetFileReadOnly - bad file} {macOnly} {
- catch {file delete -force foo.file}
- list [catch {file attributes foo.file -readonly} msg] $msg
-} {1 {could not read "foo.file": no such file or directory}}
-test macFCmd-2.2 {GetFileReadOnly - file not read only} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -readonly} msg] $msg \
- [file delete -force foo.file]
-} {0 0 {}}
-test macFCmd-2.3 {GetFileReadOnly - file read only} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- file attributes foo.file -readonly 1
- list [catch {file attributes foo.file -readonly} msg] $msg \
- [file delete -force foo.file]
-} {0 1 {}}
-test macFCmd-2.4 {GetFileReadOnly - directory not read only} {macOnly} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -readonly} msg] $msg \
- [file delete -force foo.dir]
-} {0 0 {}}
-test macFCmd-2.5 {GetFileReadOnly - directory read only} {macOnly fileSharing} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- file attributes foo.dir -readonly 1
- list [catch {file attributes foo.dir -readonly} msg] $msg \
- [file delete -force foo.dir]
-} {0 1 {}}
-
-test macFCmd-3.1 {SetFileFinderAttributes - bad file} {macOnly} {
- catch {file delete -force foo.file}
- list [catch {file attributes foo.file -creator FOOO} msg] $msg
-} {1 {could not read "foo.file": no such file or directory}}
-test macFCmd-3.2 {SetFileFinderAttributes - creator} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -creator FOOO} msg] $msg \
- [file attributes foo.file -creator] [file delete -force foo.file]
-} {0 {} FOOO {}}
-test macFCmd-3.3 {SetFileFinderAttributes - bad creator} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -creator 0} msg] $msg \
- [file delete -force foo.file]
-} {1 {expected Macintosh OS type but got "0"} {}}
-test macFCmd-3.4 {SetFileFinderAttributes - hidden} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -hidden 1} msg] $msg \
- [file attributes foo.file -hidden] [file delete -force foo.file]
-} {0 {} 1 {}}
-test macFCmd-3.5 {SetFileFinderAttributes - type} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -type FOOO} msg] $msg \
- [file attributes foo.file -type] [file delete -force foo.file]
-} {0 {} FOOO {}}
-test macFCmd-3.6 {SetFileFinderAttributes - bad type} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -type 0} msg] $msg \
- [file delete -force foo.file]
-} {1 {expected Macintosh OS type but got "0"} {}}
-test macFCmd-3.7 {SetFileFinderAttributes - directory} {macOnly} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -creator FOOO} msg] \
- $msg [file delete -force foo.dir]
-} {1 {cannot set -creator: "foo.dir" is a directory} {}}
-
-test macFCmd-4.1 {SetFileReadOnly - bad file} {macOnly} {
- catch {file delete -force foo.file}
- list [catch {file attributes foo.file -readonly 1} msg] $msg
-} {1 {could not read "foo.file": no such file or directory}}
-test macFCmd-4.2 {SetFileReadOnly - file not readonly} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -readonly 0} msg] \
- $msg [file attributes foo.file -readonly] [file delete -force foo.file]
-} {0 {} 0 {}}
-test macFCmd-4.3 {SetFileReadOnly - file readonly} {macOnly} {
- catch {file delete -force foo.file}
- close [open foo.file w]
- list [catch {file attributes foo.file -readonly 1} msg] \
- $msg [file attributes foo.file -readonly] [file delete -force foo.file]
-} {0 {} 1 {}}
-test macFCmd-4.4 {SetFileReadOnly - directory not readonly} \
- {macOnly fileSharing} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -readonly 0} msg] \
- $msg [file attributes foo.dir -readonly] [file delete -force foo.dir]
-} {0 {} 0 {}}
-test macFCmd-4.5 {SetFileReadOnly - directory not readonly} \
- {macOnly notFileSharing} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -readonly 0} msg] $msg \
- [file delete -force foo.dir]
-} {1 {cannot set a directory to read-only when File Sharing is turned off} {}}
-test macFCmd-4.6 {SetFileReadOnly - directory readonly} {macOnly fileSharing} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -readonly 1} msg] $msg \
- [file attributes foo.dir -readonly] [file delete -force foo.dir]
-} {0 {} 1 {}}
-test macFCmd-4.7 {SetFileReadOnly - directory readonly} {macOnly notFileSharing} {
- catch {file delete -force foo.dir}
- file mkdir foo.dir
- list [catch {file attributes foo.dir -readonly 1} msg] $msg \
- [file delete -force foo.dir]
-} {1 {cannot set a directory to read-only when File Sharing is turned off} {}}
-
-# cleanup
-cd $oldcwd
-::tcltest::cleanupTests
-return
diff --git a/tests/osa.test b/tests/osa.test
deleted file mode 100644
index 7a16ef1..0000000
--- a/tests/osa.test
+++ /dev/null
@@ -1,48 +0,0 @@
-# Commands covered: AppleScript
-#
-# This file contains a collection of tests for one or more of the Tcl
-# built-in commands. Sourcing this file into Tcl runs the tests and
-# generates output for errors. No output means no errors were found.
-#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: osa.test,v 1.6 2000/04/10 17:19:02 ericm Exp $
-
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
- namespace import -force ::tcltest::*
-}
-
-# Only run the test if we can load the AppleScript command
-set ::tcltest::testConstraints(appleScript) [expr {[info commands AppleScript] != ""}]
-
-test osa-1.1 {Tcl_OSAComponentCmd} {macOnly appleScript} {
- list [catch AppleScript msg] $msg
-} {1 {wrong # args: should be "AppleScript option ?arg ...?"}}
-test osa-1.2 {Tcl_OSAComponentCmd} {macOnly appleScript} {
- list [catch {AppleScript x} msg] $msg
-} {1 {bad option "x": should be compile, decompile, delete, execute, info, load, run or store}}
-
-test osa-1.3 {TclOSACompileCmd} {macOnly appleScript} {
- list [catch {AppleScript compile} msg] $msg
-} {1 {wrong # args: should be "AppleScript compile ?options? code"}}
-
-# cleanup
-::tcltest::cleanupTests
-return
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/resource.test b/tests/resource.test
deleted file mode 100644
index a650d48..0000000
--- a/tests/resource.test
+++ /dev/null
@@ -1,369 +0,0 @@
-# Commands covered: resource
-#
-# This file contains a collection of tests for one or more of the Tcl
-# built-in commands. Sourcing this file into Tcl runs the tests and
-# generates output for errors. No output means no errors were found.
-#
-# Copyright (c) 1996-1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: resource.test,v 1.9 2003/10/23 10:07:30 vincentdarley Exp $
-
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
- namespace import -force ::tcltest::*
-}
-
-test resource-1.1 {resource tests} {macOnly} {
- list [catch {resource} msg] $msg
-} {1 {wrong # args: should be "resource option ?arg ...?"}}
-test resource-1.2 {resource tests} {macOnly} {
- list [catch {resource _bad_} msg] $msg
-} {1 {bad option "_bad_": must be close, delete, files, list, open, read, types, or write}}
-
-# resource open & close tests
-test resource-2.1 {resource open & close tests} {macOnly} {
- list [catch {resource open} msg] $msg
-} {1 {wrong # args: should be "resource open fileName ?permissions?"}}
-test resource-2.2 {resource open & close tests} {macOnly} {
- list [catch {resource open resource.test r extraArg} msg] $msg
-} {1 {wrong # args: should be "resource open fileName ?permissions?"}}
-test resource-2.3 {resource open & close tests} {macOnly} {
- list [catch {resource open resource.test bad_perms} msg] $msg
-} {1 {illegal access mode "bad_perms"}}
-test resource-2.4 {resource open & close tests} {macOnly} {
- list [catch {resource open _bad_file_} msg] $msg
-} {1 {file does not exist}}
-test resource-2.5 {resource open & close tests} {macOnly} {
- testWriteTextResource -rsrc fileRsrcName -file rsrc.file {error "don't source me"}
- set id [resource open rsrc.file]
- resource close $id
- file delete rsrc.file
-} {}
-test resource-2.6 {resource open & close tests} {macOnly} {
- catch {file delete rsrc.file}
- testWriteTextResource -rsrc fileRsrcName -file rsrc.file {A test string}
- set id [resource open rsrc.file]
- set result [string compare [resource open rsrc.file] $id]
- lappend result [resource read TEXT fileRsrcName $id]
- resource close $id
- file delete rsrc.file
- set result
-} {0 {A test string}}
-test resource-2.7 {resource open & close tests} {macOnly} {
- catch {file delete rsrc.file}
- testWriteTextResource -rsrc fileRsrcName -file rsrc.file {error "don't source me"}
- set id [resource open rsrc.file r]
- set result [catch {resource open rsrc.file w} mssg]
- resource close $id
- file delete rsrc.file
- lappend result $mssg
- set result
-} {1 {Resource already open with different permissions.}}
-test resource-2.8 {resource open & close tests} {macOnly} {
- list [catch {resource close} msg] $msg
-} {1 {wrong # args: should be "resource close resourceRef"}}
-test resource-2.9 {resource open & close tests} {macOnly} {
- list [catch {resource close foo bar} msg] $msg
-} {1 {wrong # args: should be "resource close resourceRef"}}
-test resource-2.10 {resource open & close tests} {macOnly} {
- list [catch {resource close _bad_resource_} msg] $msg
-} {1 {invalid resource file reference "_bad_resource_"}}
-test resource-2.11 {resource open & close tests} {macOnly} {
- set result [catch {resource close System} mssg]
- lappend result $mssg
-} {1 {can't close "System" resource file}}
-test resource-2.12 {resource open & close tests} {macOnly} {
- set result [catch {resource close application} mssg]
- lappend result $mssg
-} {1 {can't close "application" resource file}}
-
-# Tests for listing resources
-test resource-3.1 {resource list tests} {macOnly} {
- list [catch {resource list} msg] $msg
-} {1 {wrong # args: should be "resource list resourceType ?resourceRef?"}}
-test resource-3.2 {resource list tests} {macOnly} {
- list [catch {resource list _bad_type_} msg] $msg
-} {1 {expected Macintosh OS type but got "_bad_type_"}}
-test resource-3.3 {resource list tests} {macOnly} {
- list [catch {resource list TEXT _bad_ref_} msg] $msg
-} {1 {invalid resource file reference "_bad_ref_"}}
-test resource-3.4 {resource list tests} {macOnly} {
- list [catch {resource list TEXT _bad_ref_ extraArg} msg] $msg
-} {1 {wrong # args: should be "resource list resourceType ?resourceRef?"}}
-test resource-3.5 {resource list tests} {macOnly} {
- catch {file delete rsrc.file}
- testWriteTextResource -rsrc fileRsrcName -file rsrc.file {error "don't source me"}
- set id [resource open rsrc.file]
- catch "resource list TEXT $id" result
- resource close $id
- set result
-} {fileRsrcName}
-test resource-3.6 {resource list tests} {macOnly} {
- # There should not be any resource of this type
- resource list XXXX
-} {}
-test resource-3.7 {resource list tests} {macOnly} {
- set resourceList [resource list STR#]
- if {[lsearch $resourceList {Tcl Environment Variables}] == -1} {
- set result {couldn't find resource that should exist}
- } else {
- set result ok
- }
-} {ok}
-
-# Tests for reading resources
-test resource-4.1 {resource read tests} {macOnly} {
- list [catch {resource read} msg] $msg
-} {1 {wrong # args: should be "resource read resourceType resourceId ?resourceRef?"}}
-test resource-4.2 {resource read tests} {macOnly} {
- list [catch {resource read TEXT} msg] $msg
-} {1 {wrong # args: should be "resource read resourceType resourceId ?resourceRef?"}}
-test resource-4.3 {resource read tests} {macOnly} {
- list [catch {resource read STR# {_non_existant_resource_}} msg] $msg
-} {1 {could not load resource}}
-test resource-4.4 {resource read tests} {macOnly} {
- # The following resource should exist and load OK without error
- catch {resource read STR# {Tcl Environment Variables}}
-} {0}
-
-# Tests for getting resource types
-test resource-5.1 {resource types tests} {macOnly} {
- list [catch {resource types _bad_ref_} msg] $msg
-} {1 {invalid resource file reference "_bad_ref_"}}
-test resource-5.2 {resource types tests} {macOnly} {
- list [catch {resource types _bad_ref_ extraArg} msg] $msg
-} {1 {wrong # args: should be "resource types ?resourceRef?"}}
-test resource-5.3 {resource types tests} {macOnly} {
- # This should never cause an error
- catch {resource types}
-} {0}
-test resource-5.4 {resource types tests} {macOnly} {
- testWriteTextResource -rsrc fileRsrcName -file rsrc.file {error "don't source me"}
- set id [resource open rsrc.file]
- set result [resource types $id]
- resource close $id
- set result
-} {TEXT}
-test resource-5.5 {resource types lists} {macOnly} {
- # This should not crash
- catch {foreach f [resource types] { resource list $f }}
-} {0}
-
-# resource write tests
-test resource-6.1 {resource write tests} {macOnly} {
- list [catch {resource write} msg] $msg
-} {1 {wrong # args: should be "resource write ?-id resourceId? ?-name resourceName? ?-file resourceRef? ?-force? resourceType data"}}
-test resource-6.2 {resource write tests} {macOnly} {
- list [catch {resource write _bad_type_ data} msg] $msg
-} {1 {expected Macintosh OS type but got "_bad_type_"}}
-test resource-6.3 {resource write tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- resource close $id
- set id [resource open rsrc2.file r]
- set result [catch {resource write -file $id -name Hello TEXT foo} errMsg]
- lappend result [string compare $errMsg "cannot write to resource file \"$id\", it was opened read only"]
- lappend result [lsearch [resource list TEXT $id] Hello]
- resource close $id
- file delete rsrc2.file
- set result
-} {1 0 -1}
-test resource-6.4 {resource write tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- resource write -file $id -name Hello TEXT {set x "our test data"}
- source -rsrc Hello rsrc2.file
- resource close $id
- file delete rsrc2.file
- set x
-} {our test data}
-test resource-6.5 {resource write tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- resource write -file $id -id 256 TEXT {HAHAHAHAHAHAHA}
- set result [catch {resource write -file $id -id 256 TEXT {HOHOHOHOHOHO}} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {the resource 256 already exists, use "-force" to overwrite it.}}
-test resource-6.6 {resource write tests} {macOnly} {
- catch {file delete rsrc2.file}
- testWriteTextResource -rsrc fileRsrcName -rsrcid 256 -file rsrc2.file -protected {error "don't tread on me"}
- set id [resource open rsrc2.file w]
- set result [catch {resource write -id 256 -force -file $id TEXT {NAHNAHNANAHNAH}} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {could not write resource id 256 of type TEXT, it was protected.}}
-test resource-6.7 {resource write tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- resource write -file $id -id 256 -name FOO TEXT {set x [list "our first test data"]}
- resource write -file $id -id 256 -name BAR -force TEXT {set x [list "our second test data"]}
- source -rsrcid 256 rsrc2.file
- lappend x [resource list TEXT $id]
- resource close $id
- file delete rsrc2.file
- set x
-} {{our second test data} BAR}
-
-#Tests for listing open resource files
-test resource-7.1 {resource file tests} {macOnly} {
- catch {resource files foo bar} mssg
- set mssg
-} {wrong # args: should be "resource files ?resourceId?"}
-test resource-7.2 {resource file tests} {macOnly} {
- catch {file delete rsrc2.file}
- set rsrcFiles [resource files]
- set id [resource open rsrc2.file w]
- set result [string compare $rsrcFiles [lrange [resource files] 1 end]]
- lappend result [string compare $id [lrange [resource files] 0 0]]
- resource close $id
- file delete rsrc2.file
- set result
-} {0 0}
-test resource-7.3 {resource file tests} {macOnly} {
- set result 0
- foreach file [resource files] {
- if {[catch {resource types $file}] != 0} {
- set result 1
- }
- }
- set result
-} {0}
-test resource-7.4 {resource file tests} {macOnly} {
- catch {resource files __NO_SUCH_RESOURCE__} mssg
- set mssg
-} {invalid resource file reference "__NO_SUCH_RESOURCE__"}
-test resource-7.5 {resource file tests} {macOnly} {
- set sys [resource files System]
- string compare $sys [file join $env(SYS_FOLDER) System]
-} {0}
-test resource-7.6 {resource file tests} {macOnly} {
- set app [resource files application]
- string compare $app [info nameofexecutable]
-} {0}
-
-#Tests for the resource delete command
-test resource-8.1 {resource delete tests} {macOnly} {
- list [catch {resource delete} msg] $msg
-} {1 {wrong # args: should be "resource delete ?-id resourceId? ?-name resourceName? ?-file resourceRef? resourceType"}}
-test resource-8.2 {resource delete tests} {macOnly} {
- list [catch {resource delete TEXT} msg] $msg
-} {1 {you must specify either "-id" or "-name" or both to "resource delete"}}
-test resource-8.3 {resource delete tests} {macOnly} {
- set result [catch {resource delete -file ffffff -id 128 TEXT} mssg]
- lappend result $mssg
-} {1 {invalid resource file reference "ffffff"}}
-test resource-8.4 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- testWriteTextResource -rsrc fileRsrcName -rsrcid 128 -file rsrc2.file {Some stuff}
- set id [resource open rsrc2.file r]
- set result [catch {resource delete -id 128 -file $id TEXT} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result [string compare $mssg "cannot delete from resource file \"$id\", it was opened read only"]
-} {1 0}
-test resource-8.5 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- testWriteTextResource -rsrc fileRsrcName -rsrcid 128 -file rsrc2.file {Some stuff}
- set id [resource open rsrc2.file w]
- set result [catch {resource delete -id 128 -file $id _bad_type_} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {expected Macintosh OS type but got "_bad_type_"}}
-test resource-8.5.1 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- set result [catch {resource delete -id 128 -file $id TEXT} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {resource not found}}
-test resource-8.6 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- set result [catch {resource delete -name foo -file $id TEXT} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {resource not found}}
-test resource-8.7 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- set id [resource open rsrc2.file w]
- resource write -file $id -name foo -id 128 TEXT {some stuff}
- resource write -file $id -name bar -id 129 TEXT {some stuff}
- set result [catch {resource delete -name foo -id 129 -file $id TEXT} mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {"-id" and "-name" values do not point to the same resource}}
-test resource-8.8 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- testWriteTextResource -rsrc fileRsrcName -rsrcid 256 -file rsrc2.file -protected {error "don't tread on me"}
- set id [resource open rsrc2.file w]
- set result [catch {resource delete -id 256 -file $id TEXT } mssg]
- resource close $id
- file delete rsrc2.file
- lappend result $mssg
-} {1 {resource cannot be deleted: it is protected.}}
-test resource-8.9 {resource delete tests} {macOnly} {
- catch {file delete rsrc2.file}
- testWriteTextResource -rsrc fileRsrcName -rsrcid 128 -file rsrc2.file {Some stuff}
- set id [resource open rsrc2.file w]
- set result [resource list TEXT $id]
- resource delete -id 128 -file $id TEXT
- lappend result [resource list TEXT $id]
- resource close $id
- file delete rsrc2.file
- set result
-} {fileRsrcName {}}
-
-# Tests for the Mac version of the source command
-catch {file delete rsrc.file}
-test resource-9.1 {source command} {macOnly} {
- testWriteTextResource -rsrc fileRsrcName -rsrcid 128 \
- -file rsrc.file {set rsrc_foo 1}
- catch {unset rsrc_foo}
- source -rsrc fileRsrcName rsrc.file
- list [catch {set rsrc_foo} msg] $msg
-} {0 1}
-test resource-9.2 {source command} {macOnly} {
- catch {unset rsrc_foo}
- list [catch {source -rsrc no_resource rsrc.file} msg] $msg
-} {1 {The resource "no_resource" could not be loaded from rsrc.file.}}
-test resource-9.3 {source command} {macOnly} {
- catch {unset rsrc_foo}
- source -rsrcid 128 rsrc.file
- list [catch {set rsrc_foo} msg] $msg
-} {0 1}
-test resource-9.4 {source command} {macOnly} {
- catch {unset rsrc_foo}
- list [catch {source -rsrcid bad_int rsrc.file} msg] $msg
-} {1 {expected integer but got "bad_int"}}
-test resource-9.5 {source command} {macOnly} {
- catch {unset rsrc_foo}
- list [catch {source -rsrcid 100 rsrc.file} msg] $msg
-} {1 {The resource "ID=100" could not be loaded from rsrc.file.}}
-
-# cleanup
-catch {file delete rsrc.file}
-::tcltest::cleanupTests
-return
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/socket.test b/tests/socket.test
index a5d9153..e575aa6 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: socket.test,v 1.28 2004/02/25 23:56:59 dgp Exp $
+# RCS: @(#) $Id: socket.test,v 1.29 2004/03/17 18:14:18 das Exp $
# Running socket tests with a remote server:
# ------------------------------------------
@@ -93,7 +93,7 @@ if {![info exists remoteServerPort]} {
#
set doTestsWithRemoteServer 1
-if {![info exists remoteServerIP] && ($tcl_platform(platform) != "macintosh")} {
+if {![info exists remoteServerIP]} {
set remoteServerIP 127.0.0.1
}
if {($doTestsWithRemoteServer == 1) && (![info exists remoteServerPort])} {
@@ -1149,12 +1149,6 @@ test socket-11.5 {remote echo, 50 lines} {socket doTestsWithRemoteServer} {
sendCommand {close $socket10_7_test_server}
set cnt
} 50
-# Macintosh sockets can have more than one server per port
-if {$tcl_platform(platform) == "macintosh"} {
- set conflictResult {0 2836}
-} else {
- set conflictResult {1 {couldn't open socket: address already in use}}
-}
test socket-11.6 {socket conflict} {socket doTestsWithRemoteServer} {
set s1 [socket -server accept 2836]
if {[catch {set s2 [socket -server accept 2836]} msg]} {
@@ -1165,7 +1159,7 @@ test socket-11.6 {socket conflict} {socket doTestsWithRemoteServer} {
}
close $s1
set result
-} $conflictResult
+} {1 {couldn't open socket: address already in use}}
test socket-11.7 {server with several clients} {socket doTestsWithRemoteServer} {
sendCommand {
set socket10_9_test_server [socket -server accept 2836]
diff --git a/tests/source.test b/tests/source.test
index ce2e87c..1d64034 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: source.test,v 1.11 2004/02/25 23:56:59 dgp Exp $
+# RCS: @(#) $Id: source.test,v 1.12 2004/03/17 18:14:18 das Exp $
if {[catch {package require tcltest 2.1}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.1 required."
@@ -192,109 +192,6 @@ test source-3.5 {return with special code etc.} -setup {
"source $sourcefile"} {a b c}}
-# Test for the Macintosh specfic features of the source command
-test source-4.1 {source error conditions} -constraints macOnly -body {
- source -rsrc _no_exist_
-} -result {The resource "_no_exist_" could not be loaded from application.} \
- -returnCodes error
-
-test source-4.2 {source error conditions} -constraints macOnly -body {
- source -rsrcid bad_id
-} -returnCodes error -result {expected integer but got "bad_id"}
-
-test source-4.3 {source error conditions} -constraints macOnly -body {
- source -rsrc rsrcName fileName extra
-} -returnCodes error -result {wrong # args: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-test source-4.4 {source error conditions} -constraints macOnly -body {
- source non_switch rsrcName
-} -returnCodes error -result {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-test source-4.5 {source error conditions} -constraints macOnly -body {
- source -bad_switch argument
-} -returnCodes error -result {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-
-testConstraint testWriteTextResource \
- [llength [info commands testWriteTextResource]]
-
-test source-5.1 {source resource files} -constraints macOnly -setup {
- set sourcefile [makeFile {} bad_file]
- removeFile bad_file
-} -body {
- source -rsrc rsrcName $sourcefile
-} -returnCodes error -match glob -result {Error finding the file: "*bad_file".}
-
-test source-5.2 {source resource files} -constraints macOnly -setup {
- set sourcefile [makeFile {return} source.file]
-} -body {
- source -rsrc rsrcName $sourcefile
-} -cleanup {
- removeFile source.file
-} -returnCodes error -match glob \
- -result {Error reading the file: "*source.file".}
-
-test source-5.3 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrc rsrcName -file $rsrc.file {set msg2 ok; return}
-} -body {
- set result [catch {source -rsrc rsrcName rsrc.file} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list ok 0 {}]
-
-test source-5.4 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrsFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrc fileRsrcName \
- -file $rsrcFile {set msg2 ok; return}
-} -body {
- source -rsrc fileRsrcName $rsrcFile
- set result [catch {source -rsrc fileRsrcName} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list ok 1 {The resource "fileRsrcName" could not be loaded from application.}]
-
-test source-5.5 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrcid 200 \
- -file $rsrcFile {set msg2 hello; set msg3 bye}
-} -body {
- set result [catch {source -rsrcid 200 $rsrcFile} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list hello 0 bye]
-
-test source-5.6 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrcid 200 \
- -file $rsrcFile {set msg2 hello; error bad; set msg3 bye}
-} -body {
- set result [catch {source -rsrcid 200 rsrc.file} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list hello 1 bad]
-
-
test source-6.1 {source is binary ok} -setup {
# Note [makeFile] writes in the system encoding.
# [source] defaults to reading in the system encoding.
diff --git a/tests/tcltest.test b/tests/tcltest.test
index 09f713d..a652407 100755
--- a/tests/tcltest.test
+++ b/tests/tcltest.test
@@ -6,7 +6,7 @@
# Copyright (c) 2000 by Ajuba Solutions
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.test,v 1.37 2003/01/31 22:19:30 dgp Exp $
+# RCS: @(#) $Id: tcltest.test,v 1.38 2004/03/17 18:14:18 das Exp $
# Note that there are several places where the value of
# tcltest::currentFailure is stored/reset in the -setup/-cleanup
@@ -525,9 +525,6 @@ set a [makeFile {
set tdiaf [makeFile {} thisdirectoryisafile]
set normaldirectory [makeDirectory normaldirectory]
-if {$::tcl_platform(platform) == "macintosh"} {
-set normaldirectory [file normalize $normaldirectory]
-}
# -tmpdir, [temporaryDirectory]
test tcltest-8.1 {tcltest a.tcl -tmpdir a} {unixOrPc} {
diff --git a/tests/unload.test b/tests/unload.test
index 00d6970..69bbaec 100644
--- a/tests/unload.test
+++ b/tests/unload.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unload.test,v 1.1 2004/02/24 22:58:48 dkf Exp $
+# RCS: @(#) $Id: unload.test,v 1.2 2004/03/17 18:14:18 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -21,12 +21,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# Figure out what extension is used for shared libraries on this
# platform.
-if {$tcl_platform(platform) == "macintosh"} {
- puts "can't run dynamic library tests on macintosh machines"
- ::tcltest::cleanupTests
- return
-}
-
# Tests require the existence of one of the DLLs in the dltest directory.
set ext [info sharedlibextension]
set testDir [file join [file dirname [info nameofexecutable]] dltest]