summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog197
-rw-r--r--tests/cmdAH.test19
-rw-r--r--tests/fCmd.test7
-rw-r--r--tests/unixFCmd.test30
-rw-r--r--tests/winFCmd.test315
5 files changed, 285 insertions, 283 deletions
diff --git a/ChangeLog b/ChangeLog
index 20f27db..d0e5729 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,123 +1,125 @@
+2006-03-20 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
+
+ * tests/cmdAH.test, tests/fCmd.test, tests/unixFCmd.test:
+ * tests/winFCmd.test: Cleanup of some test constraint handling, and a
+ few other minor issues.
+
2006-03-18 Vince Darley <vincentdarley@sourceforge.net>
* generic/tclFileName.c:
* doc/FileSystem.3:
- * tests/fileName.test: Fix to [Bug 1084705] so that
- 'glob -nocomplain' finally agrees with its documentation and
- doesn't swallow genuine errors.
+ * tests/fileName.test: Fix to [Bug 1084705] so that 'glob -nocomplain'
+ finally agrees with its documentation and doesn't swallow genuine
+ errors.
- ***POTENTIAL INCOMPATIBILITY*** for scripts that assumed
- '-nocomplain' removes the need for 'catch' to deal with
- non-understood path names.
+ ***POTENTIAL INCOMPATIBILITY*** for scripts that assumed '-nocomplain'
+ removes the need for 'catch' to deal with non-understood path names.
- Small optimisation to implementation of pattern==NULL case
- of TclGlob, and clarification to the documentation
- [Tclvfs bug 1405317]
+ Small optimisation to implementation of pattern==NULL case of TclGlob,
+ and clarification to the documentation. [Tclvfs bug 1405317]
2006-03-18 Vince Darley <vincentdarley@sourceforge.net>
* tests/fCmd.test: added knownBug test case for [Bug 1394972]
* tests/winFCmd.test:
- * tests/tcltest.test: corrected tests to better account for
- behaviour of writable/non-writable directories on Windows 2000/XP.
- This, with the previous patches, closes [Bug 1193497]
+ * tests/tcltest.test: corrected tests to better account for behaviour
+ of writable/non-writable directories on Windows 2000/XP. This, with
+ the previous patches, closes [Bug 1193497]
2006-03-17 Andreas Kupries <andreask@activestate.com>
* doc/chan.n: Updated with documentation for the commands 'chan
- create' and 'chan postevent' (TIP #219).
+ create' and 'chan postevent' (TIP #219).
- * doc/refchan.n: New file. Documentation of the command handler
- API for reflected channels (TIP #219).
+ * doc/refchan.n: New file. Documentation of the command handler API
+ for reflected channels (TIP #219).
2006-03-17 Joe Mistachkin <joe@mistachkin.com>
- * unix/tclUnixPort.h: Include pthread.h prior to pthread_np.h
- [Bug 1444692]
-
-2006-03-17 Joe Mistachkin <joe@mistachkin.com>
+ * unix/tclUnixPort.h: Include pthread.h prior to pthread_np.h [Bug
+ 1444692]
- * win/tclWinTest.c: Corrected typo of 'initializeMutex' that
- prevented successful compilation.
+ * win/tclWinTest.c: Corrected typo of 'initializeMutex' that prevented
+ successful compilation.
2006-03-16 Andreas Kupries <andreask@activestate.com>
* doc/open.n: Documented the changed behaviour of 'a'ppend mode.
- * tests/io.test (io-43.1 io-44.[1234]): Rewritten to be
- self-contained with regard to setup and cleanup. [Bug 681793].
+ * tests/io.test (io-43.1 io-44.[1234]): Rewritten to be self-contained
+ with regard to setup and cleanup. [Bug 681793].
- * generic/tclIOUtil.c (TclGetOpenMode): Added the flag O_APPEND to
- the list of POSIX modes used when opening a file for
- 'a'ppend. This enables the proper automatic seek-to-end-on-write
- by the OS. See [Bug 680143] for longer discussion.
+ * generic/tclIOUtil.c (TclGetOpenMode): Added the flag O_APPEND to the
+ list of POSIX modes used when opening a file for 'a'ppend. This
+ enables the proper automatic seek-to-end-on-write by the OS. See [Bug
+ 680143] for longer discussion.
- * tests/ioCmd.test (iocmd-13.7.*): Extended the testsuite to check
- the new handling of 'a'.
+ * tests/ioCmd.test (iocmd-13.7.*): Extended the testsuite to check the
+ new handling of 'a'.
2006-03-15 Andreas Kupries <andreask@activestate.com>
- * tests/socket.test: Extended the timeout in socket-11.11 from 10
- to 40 seconds to allow for really slow machines. Also extended
- actual/expected results with value of variable 'done' to make it
- clearer when a test fails due to a timeout. [Bug 792159].
+ * tests/socket.test: Extended the timeout in socket-11.11 from 10 to
+ 40 seconds to allow for really slow machines. Also extended
+ actual/expected results with value of variable 'done' to make it
+ clearer when a test fails due to a timeout. [Bug 792159].
2006-03-15 Vince Darley <vincentdarley@sourceforge.net>
- * win/fCmd.test: add proper test constraints so the new
- tests don't run on Unix.
+ * win/fCmd.test: add proper test constraints so the new tests don't
+ run on Unix.
2006-03-14 Andreas Kupries <andreask@activestate.com>
- * generic/tclPipe.c (TclCreatePipeline): Modified the processing
- of pipebars to fail if the last bar is followed only by
- redirections. [Bug 768659].
+ * generic/tclPipe.c (TclCreatePipeline): Modified the processing of
+ pipebars to fail if the last bar is followed only by redirections.
+ [Bug 768659]
2006-03-14 Andreas Kupries <andreask@activestate.com>
- * doc/fconfigure.n: Clarified that -translation is binary is
- reported as lf when queried, because it is identical to lf,
- except for the special additional behaviour when setting
- it. [Bug 666770].
+ * doc/fconfigure.n: Clarified that -translation is binary is reported
+ as lf when queried, because it is identical to lf, except for the
+ special additional behaviour when setting it. [Bug 666770].
2006-03-14 Andreas Kupries <andreask@activestate.com>
- * doc/clock.n: Removed double-quotes around section title NAME. not needed.
+ * doc/clock.n: Removed double-quotes around section title NAME. not
+ needed.
* unix/installManpage: Reverted part to handle double-quotes in
- section NAME, chokes older sed installations.
+ section NAME, chokes older sed installations.
2006-03-14 Andreas Kupries <andreask@activestate.com>
- * library/tm.tcl (::tcl::tm::Defaults): Fixed handling of
- environment variable TCLX.y_TM_PATH, bad variable reference. See
- [SF Tcl Bug 1448251]. Thanks to Julian Noble.
+ * library/tm.tcl (::tcl::tm::Defaults): Fixed handling of environment
+ variable TCLX.y_TM_PATH, bad variable reference. [Bug 1448251]. Thanks
+ to Julian Noble.
2006-03-14 Vince Darley <vincentdarley@sourceforge.net>
- * win/tclWinFile.c: updated patch to deal with 'file writable'
- issues on Windows XP/2000.
+ * win/tclWinFile.c: updated patch to deal with 'file writable' issues
+ on Windows XP/2000.
* generic/tclTest.c:
* unix/tclUnixTest.c:
* win/tclWinTest.c:
- * tests/fCmd,test: updated test suite to deal with correct
- permissions setting and differences between XP/2000 and 95/98
- 3 tests still fail; to be dealt with shortly
+ * tests/fCmd.test: updated test suite to deal with correct permissions
+ setting and differences between XP/2000 and 95/98 3 tests still fail;
+ to be dealt with shortly
2006-03-13 Don Porter <dgp@users.sourceforge.net>
- * generic/tclEncoding.c: Report error when an escape encoding
- is missing one of its sub-encodings [Bug 506653].
+ * generic/tclEncoding.c: Report error when an escape encoding is
+ missing one of its sub-encodings [Bug 506653].
- * unix/configure.in: Revert change from 2005-07-26 that sometimes
- * unix/configure: added $prefix/share to the tcl_pkgPath.
- See [Patch 1231015]. autoconf-2.59.
+ * unix/configure.in: Revert change from 2005-07-26 that sometimes
+ * unix/configure: added $prefix/share to the tcl_pkgPath. See
+ [Patch 1231015]. autoconf-2.59.
2006-03-10 Miguel Sofer <msofer@users.sf.net>
- * generic/tclProc.c (ObjInterpProcEx):
- * tests/apply.test (apply-5.1): fix [apply] error messages
- so that they quote the lambda expression [Bug 1447355].
+ * generic/tclProc.c (ObjInterpProcEx):
+ * tests/apply.test (apply-5.1): Fix [apply] error messages so that
+ they quote the lambda expression [Bug 1447355].
2006-03-10 Zoran Vasiljevic <vasiljevic@users.sourceforge.net>
@@ -126,18 +128,16 @@
* generic/tclEvent.c: Cosmetic touches and identation
* generic/tclInt.h: Added TclpFinalizeSockets() call.
- * generic/tclIO.c: Calls TclpFinalizeSockets() as part
- of the TclFinalizeIOSubsystem().
+ * generic/tclIO.c: Calls TclpFinalizeSockets() as part of the
+ TclFinalizeIOSubsystem().
* unix/tclUnixSock.c: Added no-op TclpFinalizeSockets().
-
- * win/tclWinPipe.c:
- * win/tclWinSock.c: Finalization of the sockets/pipes
- is now solely done in TclpFinalizeSockets() and
- TclpFinalizePipes() and not over the thread-exit handler,
- because the order of actions the Tcl generic core will
- impose may result in cores/hangs if the thread exit handler
- tears down corresponding subsystem(s) too early.
+
+ * win/tclWinPipe.c, win/tclWinSock.c: Finalization of sockets/pipes is
+ now solely done in TclpFinalizeSockets() and TclpFinalizePipes() and
+ not over the thread-exit handler, because the order of actions the Tcl
+ generic core will impose may result in cores/hangs if the thread exit
+ handler tears down corresponding subsystem(s) too early.
2006-03-10 Vince Darley <vincentdarley@sourceforge.net>
@@ -145,9 +145,9 @@
2006-03-09 Vince Darley <vincentdarley@sourceforge.net>
- * win/tclWinFile.c: fix to 'file writable' in certain XP
- directories. Thanks to fvogel and jfg. [Patch 1344540]
- Modified patch to make use of existing use of getSecurityProc.
+ * win/tclWinFile.c: fix to 'file writable' in certain XP directories.
+ Thanks to fvogel and jfg. [Patch 1344540] Modified patch to make use
+ of existing use of getSecurityProc.
2006-03-08 Don Porter <dgp@users.sourceforge.net>
@@ -155,43 +155,44 @@
* tests/incr.test:
2006-03-07 Joe English <jenglish@users.sourceforge.net>
- * unix/tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD,
- as per the other *BSD variants [Bug 1334613].
+
+ * unix/tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD, as per the
+ other *BSD variants [Bug 1334613].
* unix/configure: Regenerated.
2006-03-07 Don Porter <dgp@users.sourceforge.net>
* changes: Update in prep. for 8.5a4 release.
- * unix/Makefile.in: Package http 2.5.2 requires Tcl 8.4, so
- * win/Makefile.in: the *.tm installation has to be placed
- in an "8.4" directory, not an "8.2" directory.
+ * unix/Makefile.in: Package http 2.5.2 requires Tcl 8.4, so the
+ * win/Makefile.in: *.tm installation has to be placed in an "8.4"
+ directory, not an "8.2" directory.
2006-03-06 Don Porter <dgp@users.sourceforge.net>
- * generic/tclBasic.c: Revised handling of TCL_EVAL_* flags to
- * tests/parse.test: simplify TclEvalObjvInternal and to correct
- the auto-loading of alias targets (parse-8.12). [Bug 1444291].
+ * generic/tclBasic.c: Revised handling of TCL_EVAL_* flags to
+ * tests/parse.test: simplify TclEvalObjvInternal and to correct
+ the auto-loading of alias targets (parse-8.12). [Bug 1444291]
2006-03-03 Don Porter <dgp@users.sourceforge.net>
- * generic/tclPathObj.c: Revised yesterday's fix for [Bug 1379287]
- to work on Windows.
+ * generic/tclPathObj.c: Revised yesterday's fix for [Bug 1379287] to
+ work on Windows.
* generic/tclObj.c: Compatibility support for existing code that
calls Tcl_GetObjType("boolean").
2006-03-02 Don Porter <dgp@users.sourceforge.net>
- * generic/tclPathObj.c: Fix for failed normalization of
- * tests/fileSystem.test: paths with /../ that lead back
- to the root of the filesystem, like /foo/.. [Bug 1379287].
+ * generic/tclPathObj.c: Fix for failed normalization of paths
+ * tests/fileSystem.test: with /../ that lead back to the root
+ of the filesystem, like /foo/.. [Bug 1379287]
2006-03-01 Reinhard Max <max@suse.de>
- * unix/installManPage: Fix the script for manpages that have
- quotes around the .SH arguments, as doctools produces them
- (Bug#1292145). Some minor cleanups and improvements.
+ * unix/installManPage: Fix the script for manpages that have quotes
+ around the .SH arguments, as doctools produces them [Bug 1292145].
+ Some minor cleanups and improvements.
2006-02-28 Don Porter <dgp@users.sourceforge.net>
@@ -210,7 +211,7 @@
* generic/tclIORChan.c: Revised error message generation and handling
* tests/ioCmd.test: of exceptional return codes in the channel
- reflection layer. [Bug 1372348].
+ reflection layer. [Bug 1372348]
2006-02-16 Don Porter <dgp@users.sourceforge.net>
@@ -253,7 +254,7 @@
* generic/tcl.decls: Made public:
* generic/tclBasic.c: TclGetEncodingFromObj
* generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj
- * generic/tclEncoding.c:TclGetEncodingSearchPath
+ * generic/tclEncoding.c:TclGetEncodingSearchPath
* generic/tclInt.decls: -> Tcl_GetEncodingSearchPath
* generic/tclInt.h: TclSetEncodingSearchPath
* generic/tclTest.c: -> Tcl_SetEncodingSearchPath
@@ -270,9 +271,9 @@
2006-02-01 Miguel Sofer <msofer@users.sf.net>
* generic/tclProc.c: minor improvements to [apply]
- * tests/apply.test: new tests; apply-5.1 currently fails to
- indicate missing work in error reporting
-
+ * tests/apply.test: new tests; apply-5.1 currently fails to indicate
+ missing work in error reporting
+
2006-02-01 Don Porter <dgp@users.sourceforge.net>
TIP#194 IMPLEMENTATION
@@ -285,7 +286,7 @@
* tests/apply.test: (New file)
* tests/proc-old.test:
* tests/proc.test:
-
+
TIP#181 IMPLEMENTATION
* doc/Namespace.3: New command [namespace unknown]. New public
@@ -916,8 +917,7 @@
* generic/tclTimer.c: Changed [after] so that it behaves correctly
* tests/timer.test: with negative arguments [Bug 1350293] and
- arguments that overflow a 32-bit word
- [Bug 1350291].
+ arguments that overflow a 32-bit word. [Bug 1350291]
2005-11-08 Don Porter <dgp@users.sourceforge.net>
@@ -2194,8 +2194,7 @@
* tests/compExpr-old.test (compExpr-3.8): Made tests conditional on
* tests/expr.test (expr-3.8): 'unix' because they get
- stack overflows on Win32
- threaded builds,
+ stack overflows on Win32 threaded builds,
2005-08-09 Vince Darley <vincentdarley@users.sourceforge.net>
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 95b9f5a..9185aff 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -10,19 +10,18 @@
# 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.51 2006/02/08 21:41:28 dgp Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.52 2006/03/20 11:39:03 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
namespace import -force ::tcltest::*
}
-tcltest::testConstraint testchmod \
- [string equal testchmod [info commands testchmod]]
+tcltest::testConstraint testchmod [llength [info commands testchmod]]
tcltest::testConstraint testsetplatform \
- [string equal testsetplatform [info commands testsetplatform]]
+ [llength [info commands testsetplatform]]
tcltest::testConstraint testvolumetype \
- [string equal testvolumetype [info commands testvolumetype]]
+ [llength [info commands testvolumetype]]
tcltest::testConstraint linkDirectory [expr \
{$tcl_platform(platform) ne "windows" || \
([string index $tcl_platform(osVersion) 0] >= 5 \
@@ -847,10 +846,10 @@ removeDirectory $dirfile
set dirfile [makeDirectory dir.file]
set gorpfile [makeFile abcde gorp.file]
-test cmdAH-18.1 {Tcl_FileObjCmd: executable} {testchmod} {
+test cmdAH-18.1 {Tcl_FileObjCmd: executable} {} {
list [catch {file executable a b} msg] $msg
} {1 {wrong # args: should be "file executable name"}}
-test cmdAH-18.2 {Tcl_FileObjCmd: executable} {testchmod notRoot} {
+test cmdAH-18.2 {Tcl_FileObjCmd: executable} {notRoot} {
file executable $gorpfile
} 0
test cmdAH-18.3 {Tcl_FileObjCmd: executable} {unix testchmod} {
@@ -861,7 +860,7 @@ test cmdAH-18.3 {Tcl_FileObjCmd: executable} {unix testchmod} {
file exe $gorpfile
} 1
-test cmdAH-18.5 {Tcl_FileObjCmd: executable} {win testchmod} {
+test cmdAH-18.5 {Tcl_FileObjCmd: executable} {win} {
# On pc, must be a .exe, .com, etc.
set x [file exe $gorpfile]
@@ -870,7 +869,7 @@ test cmdAH-18.5 {Tcl_FileObjCmd: executable} {win testchmod} {
removeFile $gorpexe
set x
} {0 1}
-test cmdAH-18.5.1 {Tcl_FileObjCmd: executable} {win testchmod} {
+test cmdAH-18.5.1 {Tcl_FileObjCmd: executable} {win} {
# On pc, must be a .exe, .com, etc.
set x [file exe $gorpfile]
@@ -879,7 +878,7 @@ test cmdAH-18.5.1 {Tcl_FileObjCmd: executable} {win testchmod} {
removeFile $gorpexe
set x
} {0 1}
-test cmdAH-18.6 {Tcl_FileObjCmd: executable} {testchmod} {
+test cmdAH-18.6 {Tcl_FileObjCmd: executable} {} {
# Directories are always executable.
file exe $dirfile
diff --git a/tests/fCmd.test b/tests/fCmd.test
index e33d678..6d2abc0 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.51 2006/03/18 18:15:13 vincentdarley Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.52 2006/03/20 11:39:03 dkf Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -80,7 +80,10 @@ proc cleanup {args} {
set x [glob -directory $p tf* td*]
}
foreach file $x {
- if {[catch {file delete -force -- $file}]} {
+ if {
+ [catch {file delete -force -- $file}]
+ && [testConstraint testchmod]
+ } then {
catch {openup $file}
catch {file delete -force -- $file}
}
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index bdead08..0d77153 100644
--- a/tests/unixFCmd.test
+++ b/tests/unixFCmd.test
@@ -9,13 +9,15 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixFCmd.test,v 1.21 2004/06/23 15:36:58 dkf Exp $
+# RCS: @(#) $Id: unixFCmd.test,v 1.22 2006/03/20 11:39:03 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
+testConstraint testchmod [llength [info commands testchmod]]
+
# These tests really need to be run from a writable directory, which
# it is assumed [temporaryDirectory] is.
set oldcwd [pwd]
@@ -51,7 +53,10 @@ proc cleanup {args} {
set x [glob -directory $p tf* td*]
}
foreach file $x {
- if {[catch {file delete -force -- $file}]} {
+ if {
+ [catch {file delete -force -- $file}]
+ && [testConstraint testchmod]
+ } then {
openup $file
file delete -force -- $file
}
@@ -229,15 +234,14 @@ test unixFCmd-14.2 {GetPermissionsAttribute} {unix notRoot} {
# Find a group that exists on this system, or else skip tests that require
# groups
-set foundgroup 0
+testConstraint foundGroup 0
if {$tcl_platform(platform) == "unix"} {
catch {
set groupList [exec groups]
set group [lindex $groupList 0]
- set foundgroup 1
+ testConstraint foundGroup 1
}
}
-testConstraint foundGroup $foundgroup
#groups hard to test
test unixFCmd-15.1 {SetGroupAttribute - invalid group} {unix notRoot} {
@@ -327,17 +331,15 @@ test unixFCmd-18.1 {Unix pwd} {nonPortable unix notRoot} {
} {1 {error getting working directory name:}}
# check whether -readonly attribute is supported
-set roattr 0
+testConstraint readonlyAttr 0
if {$tcl_platform(platform) == "unix"} {
- catch {file delete -force -- foo.test}
- close [open foo.test w]
+ set f [makeFile "whatever"]
catch {
- file attributes foo.test -readonly
- set roattr 1
+ file attributes $f -readonly
+ testConstraint readonlyAttr 1
}
- file delete -force -- foo.test
+ removeFile $f
}
-testConstraint readonlyAttr $roattr
test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} {unix notRoot readonlyAttr} {
catch {file delete -force -- foo.test}
@@ -370,3 +372,7 @@ cleanup
cd $oldcwd
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End:
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 3ffaed2..8c95a4c 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.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: winFCmd.test,v 1.39 2006/03/18 18:15:13 vincentdarley Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.40 2006/03/20 11:39:03 dkf Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -18,6 +18,17 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
+# Initialise the test constraints
+
+testConstraint win2000orXP 0
+testConstraint winOlderThan2000 0
+testConstraint testvolumetype [llength [info commands testvolumetype]]
+testConstraint testfile [llength [info commands testfile]]
+testConstraint testchmod [llength [info commands testchmod]]
+testConstraint cdrom 0
+testConstraint exdev 0
+testConstraint longFileNames 0
+
proc createfile {file {string a}} {
set f [open $file w]
puts -nonewline $f $string
@@ -44,38 +55,24 @@ proc cleanup {args} {
}
}
-if {[string equal $tcl_platform(platform) "windows"]} {
- if {[string equal $tcl_platform(os) "Windows NT"] \
- && [string equal [string index $tcl_platform(osVersion) 0] "5"]} {
- tcltest::testConstraint win2000orXP 1
- tcltest::testConstraint winOlderThan2000 0
+if {[testConstraint winOnly]} {
+ if {[testConstraint nt] && [string index $tcl_platform(osVersion) 0]==5} {
+ # Warning: Win 6 will break this!
+ testConstraint win2000orXP 1
} else {
- tcltest::testConstraint win2000orXP 0
- tcltest::testConstraint winOlderThan2000 1
+ testConstraint winOlderThan2000 1
}
-} else {
- tcltest::testConstraint win2000orXP 0
- tcltest::testConstraint winOlderThan2000 0
}
# find a CD-ROM so we can test read-only filesystems.
-set cdrom {}
-if { [info commands ::testvolumetype] ne {} } {
- foreach p {d e f g h i j k l m n o p q r s t u v w x y z} {
- if { ! [catch { testvolumetype ${p}: } result] && $result eq {CDFS} } {
- set cdrom ${p}:
- }
- }
-}
-
proc findfile {dir} {
- foreach p [glob $dir/*] {
+ foreach p [glob -directory $dir *] {
if {[file type $p] == "file"} {
return $p
}
}
- foreach p [glob $dir/*] {
+ foreach p [glob -directory $dir *] {
if {[file type $p] == "directory"} {
set f [findfile $p]
if {$f != ""} {
@@ -86,30 +83,28 @@ proc findfile {dir} {
return ""
}
-if {$cdrom != ""} {
- testConstraint cdrom 1
- set cdfile [findfile $cdrom]
-} else {
- testConstraint cdrom 0
+if {[testConstraint testvolumetype]} {
+ foreach p {d e f g h i j k l m n o p q r s t u v w x y z} {
+ if {![catch {testvolumetype ${p}:} result] && $result eq "CDFS"} {
+ set cdrom ${p}:
+ set cdfile [findfile $cdrom]
+ testConstraint cdrom 1
+ break
+ }
+ }
}
+# NB: filename is chosen to be short but unlikely to clash with other apps
if {[file exists c:/] && [file exists d:/]} {
- catch {file delete d:/tf1}
- if {[catch {close [open d:/tf1 w]}] == 0} {
- file delete d:/tf1
+ catch {file delete d:/TclTmpF.1}
+ if {[catch {close [open d:/TclTmpF.1 w]}] == 0} {
+ file delete d:/TclTmpF.1
testConstraint exdev 1
- } else {
- testConstraint exdev 0
}
-} else {
- testConstraint exdev 0
}
file delete -force -- td1
-set foo [catch {open td1 w} testfile]
-if {$foo} {
- testConstraint longFileNames 0
-} else {
+if {![catch {open td1 w} testfile]} {
close $testfile
testConstraint longFileNames 1
file delete -force -- td1
@@ -131,64 +126,64 @@ append longname $longname
# it can be difficult to actually forward "insane" arguments to the
# low-level posix emulation layer.
-test winFCmd-1.1 {TclpRenameFile: errno: EACCES} {win cdrom} {
+test winFCmd-1.1 {TclpRenameFile: errno: EACCES} {win cdrom testfile} {
list [catch {testfile mv $cdfile $cdrom/dummy~~.fil} msg] $msg
} {1 EACCES}
-test winFCmd-1.2 {TclpRenameFile: errno: EEXIST} {win} {
+test winFCmd-1.2 {TclpRenameFile: errno: EEXIST} {win testfile} {
cleanup
file mkdir td1/td2/td3
file mkdir td2
list [catch {testfile mv td2 td1/td2} msg] $msg
} {1 EEXIST}
-test winFCmd-1.3 {TclpRenameFile: errno: EINVAL} {win} {
+test winFCmd-1.3 {TclpRenameFile: errno: EINVAL} {win testfile} {
cleanup
list [catch {testfile mv / td1} msg] $msg
} {1 EINVAL}
-test winFCmd-1.4 {TclpRenameFile: errno: EINVAL} {win} {
+test winFCmd-1.4 {TclpRenameFile: errno: EINVAL} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile mv td1 td1/td2} msg] $msg
} {1 EINVAL}
-test winFCmd-1.5 {TclpRenameFile: errno: EISDIR} {win} {
+test winFCmd-1.5 {TclpRenameFile: errno: EISDIR} {win testfile} {
cleanup
file mkdir td1
createfile tf1
list [catch {testfile mv tf1 td1} msg] $msg
} {1 EISDIR}
-test winFCmd-1.6 {TclpRenameFile: errno: ENOENT} {win} {
+test winFCmd-1.6 {TclpRenameFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile mv tf1 tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-1.7 {TclpRenameFile: errno: ENOENT} {win} {
+test winFCmd-1.7 {TclpRenameFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile mv "" tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-1.8 {TclpRenameFile: errno: ENOENT} {win} {
+test winFCmd-1.8 {TclpRenameFile: errno: ENOENT} {win testfile} {
cleanup
createfile tf1
list [catch {testfile mv tf1 ""} msg] $msg
} {1 ENOENT}
-test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} {win} {
+test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} {win testfile} {
cleanup
file mkdir td1
createfile tf1
list [catch {testfile mv td1 tf1} msg] $msg
} {1 ENOTDIR}
-test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} {win exdev} {
+test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} {win exdev testfile} {
file delete -force d:/tf1
file mkdir c:/tf1
set msg [list [catch {testfile mv c:/tf1 d:/tf1} msg] $msg]
file delete -force c:/tf1
set msg
} {1 EXDEV}
-test winFCmd-1.11 {TclpRenameFile: errno: EACCES} {win} {
+test winFCmd-1.11 {TclpRenameFile: errno: EACCES} {win testfile} {
cleanup
set fd [open tf1 w]
set msg [list [catch {testfile mv tf1 tf2} msg] $msg]
close $fd
set msg
} {1 EACCES}
-test winFCmd-1.12 {TclpRenameFile: errno: EACCES} {win} {
+test winFCmd-1.12 {TclpRenameFile: errno: EACCES} {win testfile} {
cleanup
createfile tf1
set fd [open tf2 w]
@@ -196,121 +191,121 @@ test winFCmd-1.12 {TclpRenameFile: errno: EACCES} {win} {
close $fd
set msg
} {1 EACCES}
-test winFCmd-1.13 {TclpRenameFile: errno: EACCES} {win win2000orXP} {
+test winFCmd-1.13 {TclpRenameFile: errno: EACCES} {win win2000orXP testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 EINVAL}
-test winFCmd-1.13.1 {TclpRenameFile: errno: EACCES} {win nt winOlderThan2000} {
+test winFCmd-1.13.1 {TclpRenameFile: errno: EACCES} {win nt winOlderThan2000 testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 EACCES}
-test winFCmd-1.13.2 {TclpRenameFile: errno: ENOENT} {win 95} {
+test winFCmd-1.13.2 {TclpRenameFile: errno: ENOENT} {win 95 testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 ENOENT}
-test winFCmd-1.14 {TclpRenameFile: errno: EACCES} {win 95} {
+test winFCmd-1.14 {TclpRenameFile: errno: EACCES} {win 95 testfile} {
cleanup
createfile tf1
list [catch {testfile mv tf1 nul} msg] $msg
} {1 EACCES}
-test winFCmd-1.15 {TclpRenameFile: errno: EEXIST} {win nt} {
+test winFCmd-1.15 {TclpRenameFile: errno: EEXIST} {win nt testfile} {
cleanup
createfile tf1
list [catch {testfile mv tf1 nul} msg] $msg
} {1 EEXIST}
-test winFCmd-1.16 {TclpRenameFile: MoveFile() != FALSE} {win} {
+test winFCmd-1.16 {TclpRenameFile: MoveFile() != FALSE} {win testfile} {
cleanup
createfile tf1 tf1
testfile mv tf1 tf2
list [file exists tf1] [contents tf2]
} {0 tf1}
-test winFCmd-1.17 {TclpRenameFile: MoveFile() == FALSE} {win} {
+test winFCmd-1.17 {TclpRenameFile: MoveFile() == FALSE} {win testfile} {
cleanup
list [catch {testfile mv tf1 tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} {win} {
+test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} {win testfile} {
cleanup
list [catch {testfile mv tf1 tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-1.19 {TclpRenameFile: errno == EACCES} {win win2000orXP} {
+test winFCmd-1.19 {TclpRenameFile: errno == EACCES} {win win2000orXP testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 EINVAL}
-test winFCmd-1.19.1 {TclpRenameFile: errno == EACCES} {win nt winOlderThan2000} {
+test winFCmd-1.19.1 {TclpRenameFile: errno == EACCES} {win nt winOlderThan2000 testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 EACCES}
-test winFCmd-1.19.2 {TclpRenameFile: errno == ENOENT} {win 95} {
+test winFCmd-1.19.2 {TclpRenameFile: errno == ENOENT} {win 95 testfile} {
cleanup
list [catch {testfile mv nul tf1} msg] $msg
} {1 ENOENT}
-test winFCmd-1.20 {TclpRenameFile: src is dir} {win nt} {
+test winFCmd-1.20 {TclpRenameFile: src is dir} {win nt testfile} {
# under 95, this would actually succeed and move the current dir out from
# under the current process!
cleanup
file delete /tf1
list [catch {testfile mv [pwd] /tf1} msg] $msg
} {1 EACCES}
-test winFCmd-1.21 {TclpRenameFile: long src} {win} {
+test winFCmd-1.21 {TclpRenameFile: long src} {win testfile} {
cleanup
list [catch {testfile mv $longname tf1} msg] $msg
} {1 ENAMETOOLONG}
-test winFCmd-1.22 {TclpRenameFile: long dst} {win} {
+test winFCmd-1.22 {TclpRenameFile: long dst} {win testfile} {
cleanup
createfile tf1
list [catch {testfile mv tf1 $longname} msg] $msg
} {1 ENAMETOOLONG}
-test winFCmd-1.23 {TclpRenameFile: move dir into self} {win} {
+test winFCmd-1.23 {TclpRenameFile: move dir into self} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile mv [pwd]/td1 td1/td2} msg] $msg
} {1 EINVAL}
-test winFCmd-1.24 {TclpRenameFile: move a root dir} {win} {
+test winFCmd-1.24 {TclpRenameFile: move a root dir} {win testfile} {
cleanup
list [catch {testfile mv / c:/} msg] $msg
} {1 EINVAL}
-test winFCmd-1.25 {TclpRenameFile: cross file systems} {win cdrom} {
+test winFCmd-1.25 {TclpRenameFile: cross file systems} {win cdrom testfile} {
cleanup
file mkdir td1
list [catch {testfile mv td1 $cdrom/td1} msg] $msg
} {1 EXDEV}
-test winFCmd-1.26 {TclpRenameFile: readonly fs} {win cdrom} {
+test winFCmd-1.26 {TclpRenameFile: readonly fs} {win cdrom testfile} {
cleanup
list [catch {testfile mv $cdfile $cdrom/dummy~~.fil} msg] $msg
} {1 EACCES}
-test winFCmd-1.27 {TclpRenameFile: open file} {win} {
+test winFCmd-1.27 {TclpRenameFile: open file} {win testfile} {
cleanup
set fd [open tf1 w]
set msg [list [catch {testfile mv tf1 tf2} msg] $msg]
close $fd
set msg
} {1 EACCES}
-test winFCmd-1.28 {TclpRenameFile: errno == EEXIST} {win} {
+test winFCmd-1.28 {TclpRenameFile: errno == EEXIST} {win testfile} {
cleanup
createfile tf1
createfile tf2
testfile mv tf1 tf2
list [file exists tf1] [file exists tf2]
} {0 1}
-test winFCmd-1.29 {TclpRenameFile: src is dir} {win} {
+test winFCmd-1.29 {TclpRenameFile: src is dir} {win testfile} {
cleanup
file mkdir td1
createfile tf1
list [catch {testfile mv td1 tf1} msg] $msg
} {1 ENOTDIR}
-test winFCmd-1.30 {TclpRenameFile: dst is dir} {win} {
+test winFCmd-1.30 {TclpRenameFile: dst is dir} {win testfile} {
cleanup
file mkdir td1
file mkdir td2/td2
list [catch {testfile mv td1 td2} msg] $msg
} {1 EEXIST}
-test winFCmd-1.31 {TclpRenameFile: TclpRemoveDirectory fails} {win} {
+test winFCmd-1.31 {TclpRenameFile: TclpRemoveDirectory fails} {win testfile} {
cleanup
file mkdir td1
file mkdir td2/td2
list [catch {testfile mv td1 td2} msg] $msg
} {1 EEXIST}
-test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} {win} {
+test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} {win testfile} {
cleanup
file mkdir td1/td2
file mkdir td2
@@ -318,7 +313,7 @@ test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} {win} {
list [file exists td1] [file exists td2] [file exists td2/td2]
} {0 1 1}
test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \
- {win exdev} {
+ {win exdev testfile testchmod} {
file mkdir d:/td1
testchmod 000 d:/td1
file mkdir c:/tf1
@@ -328,56 +323,56 @@ test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \
file delete -force c:/tf1
set msg
} {1 EXDEV 0}
-test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} {win} {
+test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} {win testfile} {
file mkdir td1
createfile tf1
list [catch {testfile mv td1 tf1} msg] $msg
} {1 ENOTDIR}
-test winFCmd-1.35 {TclpRenameFile: src is not dir, dst is} {win} {
+test winFCmd-1.35 {TclpRenameFile: src is not dir, dst is} {win testfile} {
file mkdir td1
createfile tf1
list [catch {testfile mv tf1 td1} msg] $msg
} {1 EISDIR}
-test winFCmd-1.36 {TclpRenameFile: src and dst not dir} {win} {
+test winFCmd-1.36 {TclpRenameFile: src and dst not dir} {win testfile} {
createfile tf1 tf1
createfile tf2 tf2
testfile mv tf1 tf2
contents tf2
} {tf1}
-test winFCmd-1.37 {TclpRenameFile: need to restore temp file} {win} {
+test winFCmd-1.37 {TclpRenameFile: need to restore temp file} {win emptyTest} {
# Can't figure out how to cause this.
# Need a file that can't be copied.
} {}
-test winFCmd-2.1 {TclpCopyFile: errno: EACCES} {win cdrom} {
+test winFCmd-2.1 {TclpCopyFile: errno: EACCES} {win cdrom testfile} {
cleanup
list [catch {testfile cp $cdfile $cdrom/dummy~~.fil} msg] $msg
} {1 EACCES}
-test winFCmd-2.2 {TclpCopyFile: errno: EISDIR} {win} {
+test winFCmd-2.2 {TclpCopyFile: errno: EISDIR} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile cp td1 tf1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.3 {TclpCopyFile: errno: EISDIR} {win} {
+test winFCmd-2.3 {TclpCopyFile: errno: EISDIR} {win testfile} {
cleanup
createfile tf1
file mkdir td1
list [catch {testfile cp tf1 td1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.4 {TclpCopyFile: errno: ENOENT} {win} {
+test winFCmd-2.4 {TclpCopyFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile cp tf1 tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-2.5 {TclpCopyFile: errno: ENOENT} {win} {
+test winFCmd-2.5 {TclpCopyFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile cp "" tf2} msg] $msg
} {1 ENOENT}
-test winFCmd-2.6 {TclpCopyFile: errno: ENOENT} {win} {
+test winFCmd-2.6 {TclpCopyFile: errno: ENOENT} {win testfile} {
cleanup
createfile tf1
list [catch {testfile cp tf1 ""} msg] $msg
} {1 ENOENT}
-test winFCmd-2.7 {TclpCopyFile: errno: EACCES} {win 95} {
+test winFCmd-2.7 {TclpCopyFile: errno: EACCES} {win 95 testfile} {
cleanup
createfile tf1
set fd [open tf2 w]
@@ -385,61 +380,61 @@ test winFCmd-2.7 {TclpCopyFile: errno: EACCES} {win 95} {
close $fd
set msg
} {1 EACCES}
-test winFCmd-2.8 {TclpCopyFile: errno: EACCES} {win win2000orXP} {
+test winFCmd-2.8 {TclpCopyFile: errno: EACCES} {win win2000orXP testfile} {
cleanup
list [catch {testfile cp nul tf1} msg] $msg
} {1 EINVAL}
-test winFCmd-2.8.1 {TclpCopyFile: errno: EACCES} {win nt winOlderThan2000} {
+test winFCmd-2.8.1 {TclpCopyFile: errno: EACCES} {win nt winOlderThan2000 testfile} {
cleanup
list [catch {testfile cp nul tf1} msg] $msg
} {1 EACCES}
-test winFCmd-2.9 {TclpCopyFile: errno: ENOENT} {win 95} {
+test winFCmd-2.9 {TclpCopyFile: errno: ENOENT} {win 95 testfile} {
cleanup
list [catch {testfile cp nul tf1} msg] $msg
} {1 ENOENT}
-test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} {win} {
+test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} {win testfile} {
cleanup
createfile tf1 tf1
testfile cp tf1 tf2
list [contents tf1] [contents tf2]
} {tf1 tf1}
-test winFCmd-2.11 {TclpCopyFile: CopyFile succeeds} {win} {
+test winFCmd-2.11 {TclpCopyFile: CopyFile succeeds} {win testfile} {
cleanup
createfile tf1 tf1
createfile tf2 tf2
testfile cp tf1 tf2
list [contents tf1] [contents tf2]
} {tf1 tf1}
-test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} {win} {
+test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} {win testfile} {
cleanup
createfile tf1 tf1
testchmod 000 tf1
testfile cp tf1 tf2
list [contents tf2] [file writable tf2]
} {tf1 0}
-test winFCmd-2.13 {TclpCopyFile: CopyFile fails} {win} {
+test winFCmd-2.13 {TclpCopyFile: CopyFile fails} {win testfile} {
cleanup
createfile tf1
file mkdir td1
list [catch {testfile cp tf1 td1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.14 {TclpCopyFile: errno == EACCES} {win} {
+test winFCmd-2.14 {TclpCopyFile: errno == EACCES} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile cp td1 tf1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.15 {TclpCopyFile: src is directory} {win} {
+test winFCmd-2.15 {TclpCopyFile: src is directory} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile cp td1 tf1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.16 {TclpCopyFile: dst is directory} {win} {
+test winFCmd-2.16 {TclpCopyFile: dst is directory} {win testfile} {
cleanup
createfile tf1
file mkdir td1
list [catch {testfile cp tf1 td1} msg] $msg
} {1 EISDIR}
-test winFCmd-2.17 {TclpCopyFile: dst is readonly} {win} {
+test winFCmd-2.17 {TclpCopyFile: dst is readonly} {win testfile testchmod} {
cleanup
createfile tf1 tf1
createfile tf2 tf2
@@ -447,7 +442,7 @@ test winFCmd-2.17 {TclpCopyFile: dst is readonly} {win} {
testfile cp tf1 tf2
list [file writable tf2] [contents tf2]
} {1 tf1}
-test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} {win 95} {
+test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} {win 95 testfile testchmod} {
cleanup
createfile tf1
createfile tf2
@@ -458,59 +453,59 @@ test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} {win 95} {
set msg "$msg [file writable tf2]"
} {1 EACCES 0}
-test winFCmd-3.1 {TclpDeleteFile: errno: EACCES} {win cdrom} {
+test winFCmd-3.1 {TclpDeleteFile: errno: EACCES} {win cdrom testfile} {
list [catch {testfile rm $cdfile $cdrom/dummy~~.fil} msg] $msg
} {1 EACCES}
-test winFCmd-3.2 {TclpDeleteFile: errno: EISDIR} {win} {
+test winFCmd-3.2 {TclpDeleteFile: errno: EISDIR} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile rm td1} msg] $msg
} {1 EISDIR}
-test winFCmd-3.3 {TclpDeleteFile: errno: ENOENT} {win} {
+test winFCmd-3.3 {TclpDeleteFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile rm tf1} msg] $msg
} {1 ENOENT}
-test winFCmd-3.4 {TclpDeleteFile: errno: ENOENT} {win} {
+test winFCmd-3.4 {TclpDeleteFile: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile rm ""} msg] $msg
} {1 ENOENT}
-test winFCmd-3.5 {TclpDeleteFile: errno: EACCES} {win} {
+test winFCmd-3.5 {TclpDeleteFile: errno: EACCES} {win testfile} {
cleanup
set fd [open tf1 w]
set msg [list [catch {testfile rm tf1} msg] $msg]
close $fd
set msg
} {1 EACCES}
-test winFCmd-3.6 {TclpDeleteFile: errno: EACCES} {win} {
+test winFCmd-3.6 {TclpDeleteFile: errno: EACCES} {win testfile} {
cleanup
list [catch {testfile rm nul} msg] $msg
} {1 EACCES}
-test winFCmd-3.7 {TclpDeleteFile: DeleteFile succeeds} {win} {
+test winFCmd-3.7 {TclpDeleteFile: DeleteFile succeeds} {win testfile} {
cleanup
createfile tf1
testfile rm tf1
file exists tf1
} {0}
-test winFCmd-3.8 {TclpDeleteFile: DeleteFile fails} {win} {
+test winFCmd-3.8 {TclpDeleteFile: DeleteFile fails} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile rm td1} msg] $msg
} {1 EISDIR}
-test winFCmd-3.9 {TclpDeleteFile: errno == EACCES} {win} {
+test winFCmd-3.9 {TclpDeleteFile: errno == EACCES} {win testfile} {
cleanup
set fd [open tf1 w]
set msg [list [catch {testfile rm tf1} msg] $msg]
close $fd
set msg
} {1 EACCES}
-test winFCmd-3.10 {TclpDeleteFile: path is readonly} {win} {
+test winFCmd-3.10 {TclpDeleteFile: path is readonly} {win testfile testchmod} {
cleanup
createfile tf1
testchmod 000 tf1
testfile rm tf1
file exists tf1
} {0}
-test winFCmd-3.11 {TclpDeleteFile: still can't remove path} {win} {
+test winFCmd-3.11 {TclpDeleteFile: still can't remove path} {win testfile testchmod} {
cleanup
set fd [open tf1 w]
testchmod 000 tf1
@@ -519,93 +514,93 @@ test winFCmd-3.11 {TclpDeleteFile: still can't remove path} {win} {
set msg
} {1 EACCES}
-test winFCmd-4.1 {TclpCreateDirectory: errno: EACCES} {win nt cdrom} {
+test winFCmd-4.1 {TclpCreateDirectory: errno: EACCES} {win nt cdrom testfile} {
list [catch {testfile mkdir $cdrom/dummy~~.dir} msg] $msg
} {1 EACCES}
-test winFCmd-4.2 {TclpCreateDirectory: errno: EACCES} {win 95 cdrom} {
+test winFCmd-4.2 {TclpCreateDirectory: errno: EACCES} {win 95 cdrom testfile} {
list [catch {testfile mkdir $cdrom/dummy~~.dir} msg] $msg
} {1 ENOSPC}
-test winFCmd-4.3 {TclpCreateDirectory: errno: EEXIST} {win} {
+test winFCmd-4.3 {TclpCreateDirectory: errno: EEXIST} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile mkdir td1} msg] $msg
} {1 EEXIST}
-test winFCmd-4.4 {TclpCreateDirectory: errno: ENOENT} {win} {
+test winFCmd-4.4 {TclpCreateDirectory: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile mkdir td1/td2} msg] $msg
} {1 ENOENT}
-test winFCmd-4.5 {TclpCreateDirectory: CreateDirectory succeeds} {win} {
+test winFCmd-4.5 {TclpCreateDirectory: CreateDirectory succeeds} {win testfile} {
cleanup
testfile mkdir td1
file type td1
} {directory}
-test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} {win} {
+test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} {win testfile} {
cleanup
file mkdir td1
testfile cpdir td1 td2
list [file type td1] [file type td2]
} {directory directory}
-test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} {win} {
+test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} {win testfile testchmod} {
cleanup
file mkdir td1
testchmod 000 td1
testfile rmdir td1
file exists td1
} {0}
-test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} {win} {
+test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} {win testfile} {
cleanup
file mkdir td1/td2
list [catch {testfile rmdir td1} msg] [file tail $msg]
} {1 {td1 EEXIST}}
-test winFCmd-6.3 {TclpRemoveDirectory: errno: EACCES} {win} {
+test winFCmd-6.3 {TclpRemoveDirectory: errno: EACCES} {win emptyTest} {
# can't test this w/o removing everything on your hard disk first!
# testfile rmdir /
} {}
-test winFCmd-6.4 {TclpRemoveDirectory: errno: ENOENT} {win} {
+test winFCmd-6.4 {TclpRemoveDirectory: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile rmdir td1} msg] [file tail $msg]
} {1 {td1 ENOENT}}
-test winFCmd-6.5 {TclpRemoveDirectory: errno: ENOENT} {win} {
+test winFCmd-6.5 {TclpRemoveDirectory: errno: ENOENT} {win testfile} {
cleanup
list [catch {testfile rmdir ""} msg] $msg
} {1 ENOENT}
-test winFCmd-6.6 {TclpRemoveDirectory: errno: ENOTDIR} {win} {
+test winFCmd-6.6 {TclpRemoveDirectory: errno: ENOTDIR} {win testfile} {
cleanup
createfile tf1
list [catch {testfile rmdir tf1} msg] [file tail $msg]
} {1 {tf1 ENOTDIR}}
-test winFCmd-6.7 {TclpRemoveDirectory: RemoveDirectory succeeds} {win} {
+test winFCmd-6.7 {TclpRemoveDirectory: RemoveDirectory succeeds} {win testfile} {
cleanup
file mkdir td1
testfile rmdir td1
file exists td1
} {0}
-test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} {win} {
+test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} {win testfile} {
cleanup
createfile tf1
list [catch {testfile rmdir tf1} msg] [file tail $msg]
} {1 {tf1 ENOTDIR}}
-test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} {win} {
+test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} {win testfile testchmod} {
cleanup
file mkdir td1
testchmod 000 td1
testfile rmdir td1
file exists td1
} {0}
-test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {win 95} {
+test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {win 95 testfile} {
cleanup
list [catch {testfile rmdir nul} msg] $msg
} {1 {nul EACCES}}
-test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} {win nt} {
+test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} {win nt testfile} {
cleanup
set res [list [catch {testfile rmdir /} msg] $msg]
# WinXP returns EEXIST, WinNT seems to return EACCES. No policy
# decision has been made as to which is correct.
regsub {E(ACCES|EXIST)} $res "EACCES or EEXIST"
} [list 1 [list / EACCES or EEXIST]]
-test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} {win 95} {
+test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} {win 95 testfile} {
cleanup
createfile tf1
set res [catch {testfile rmdir tf1} msg]
@@ -613,14 +608,14 @@ test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} {win 95} {
set msg [list [file tail [lindex $msg 0]] [lindex $msg 1]]
list $res $msg
} {1 {tf1 ENOTDIR}}
-test winFCmd-6.13 {TclpRemoveDirectory: write-protected} {win} {
+test winFCmd-6.13 {TclpRemoveDirectory: write-protected} {win testfile testchmod} {
cleanup
file mkdir td1
testchmod 000 td1
testfile rmdir td1
file exists td1
} {0}
-test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {win 95} {
+test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {win 95 testfile} {
cleanup
file mkdir td1/td2
set res [catch {testfile rmdir td1} msg]
@@ -628,79 +623,79 @@ test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {win 95} {
set msg [list [file tail [lindex $msg 0]] [lindex $msg 1]]
list $res $msg
} {1 {td1 EEXIST}}
-test winFCmd-6.15 {TclpRemoveDirectory: !recursive} {win} {
+test winFCmd-6.15 {TclpRemoveDirectory: !recursive} {win testfile} {
cleanup
file mkdir td1/td2
list [catch {testfile rmdir td1} msg] [file tail $msg]
} {1 {td1 EEXIST}}
-test winFCmd-6.16 {TclpRemoveDirectory: recursive, but errno != EEXIST} {win} {
+test winFCmd-6.16 {TclpRemoveDirectory: recursive, but errno != EEXIST} {win testfile} {
cleanup
createfile tf1
list [catch {testfile rmdir -force tf1} msg] $msg
} {1 {tf1 ENOTDIR}}
-test winFCmd-6.17 {TclpRemoveDirectory: calls TraverseWinTree} {win} {
+test winFCmd-6.17 {TclpRemoveDirectory: calls TraverseWinTree} {win testfile} {
cleanup
file mkdir td1/td2
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-7.1 {TraverseWinTree: targetPtr == NULL} {win} {
+test winFCmd-7.1 {TraverseWinTree: targetPtr == NULL} {win testfile} {
cleanup
file mkdir td1/td2/td3
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-7.2 {TraverseWinTree: targetPtr != NULL} {win} {
+test winFCmd-7.2 {TraverseWinTree: targetPtr != NULL} {win testfile} {
cleanup
file mkdir td1/td2/td3
testfile cpdir td1 td2
list [file exists td1] [file exists td2]
} {1 1}
-test winFCmd-7.3 {TraverseWinTree: sourceAttr == -1} {win} {
+test winFCmd-7.3 {TraverseWinTree: sourceAttr == -1} {win testfile} {
cleanup
list [catch {testfile cpdir td1 td2} msg] $msg
} {1 {td1 ENOENT}}
-test winFCmd-7.4 {TraverseWinTree: source isn't directory} {win} {
+test winFCmd-7.4 {TraverseWinTree: source isn't directory} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile cpdir td1 td2
contents td2/tf1
} {tf1}
-test winFCmd-7.5 {TraverseWinTree: call TraversalCopy: DOTREE_F} {win} {
+test winFCmd-7.5 {TraverseWinTree: call TraversalCopy: DOTREE_F} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile cpdir td1 td2
contents td2/tf1
} {tf1}
-test winFCmd-7.6 {TraverseWinTree: call TraversalDelete: DOTREE_F} {win} {
+test winFCmd-7.6 {TraverseWinTree: call TraversalDelete: DOTREE_F} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-7.7 {TraverseWinTree: append \ to source if necessary} {win} {
+test winFCmd-7.7 {TraverseWinTree: append \ to source if necessary} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile cpdir td1 td2
contents td2/tf1
} {tf1}
-test winFCmd-7.8 {TraverseWinTree: append \ to source if necessary} {win 95 cdrom} {
+test winFCmd-7.8 {TraverseWinTree: append \ to source if necessary} {win 95 cdrom testfile} {
# cdrom can return either d:\ or D:/, but we only care about the errcode
list [catch {testfile rmdir $cdrom/} msg] [lindex $msg 1]
} {1 EACCES} ; # was EEXIST, but changed for win98.
-test winFCmd-7.9 {TraverseWinTree: append \ to source if necessary} {win nt cdrom} {
+test winFCmd-7.9 {TraverseWinTree: append \ to source if necessary} {win nt cdrom testfile} {
list [catch {testfile rmdir $cdrom/} msg] [lindex $msg 1]
} {1 EACCES}
test winFCmd-7.10 {TraverseWinTree: can't read directory: handle == INVALID} \
- {win} {
+ {win emptyTest} {
# can't make it happen
} {}
-test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {win} {
+test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {win testfile testchmod} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
@@ -708,36 +703,36 @@ test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {win} {
testfile cpdir td1 td2
list [file exists td2] [file writable td2]
} {1 1}
-test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} {win} {
+test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-7.13 {TraverseWinTree: append \ to target if necessary} {win} {
+test winFCmd-7.13 {TraverseWinTree: append \ to target if necessary} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile cpdir td1 td2
contents td2/tf1
} {tf1}
-test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} {win 95} {
+test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} {win 95 testfile} {
cleanup
file mkdir td1
list [catch {testfile cpdir td1 /} msg] $msg
} {1 {/ EEXIST}}
-test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} {win nt} {
+test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} {win nt testfile} {
cleanup
file mkdir td1
list [catch {testfile cpdir td1 /} msg] $msg
} {1 {/ EACCES}}
-test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} {win} {
+test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} {win testfile} {
cleanup
file mkdir td1
testfile cpdir td1 td2
} {}
-test winFCmd-7.17 {TraverseWinTree: recurse on files: one file} {win} {
+test winFCmd-7.17 {TraverseWinTree: recurse on files: one file} {win testfile} {
cleanup
file mkdir td1
createfile td1/td2
@@ -745,7 +740,7 @@ test winFCmd-7.17 {TraverseWinTree: recurse on files: one file} {win} {
glob td2/*
} {td2/td2}
test winFCmd-7.18 {TraverseWinTree: recurse on files: several files and dir} \
- {win} {
+ {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1
@@ -756,7 +751,7 @@ test winFCmd-7.18 {TraverseWinTree: recurse on files: several files and dir} \
testfile cpdir td1 td2
lsort [glob td2/*]
} {td2/td2 td2/tf1 td2/tf2 td2/tf3 td2/tf4}
-test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {win} {
+test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {win testfile testchmod} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
@@ -765,43 +760,43 @@ test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {win} {
list [file exists td2] [file writable td2]
} {1 1}
test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} \
- {win} {
+ {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1 tf1
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-7.21 {TraverseWinTree: fill errorPtr} {win} {
+test winFCmd-7.21 {TraverseWinTree: fill errorPtr} {win testfile} {
cleanup
list [catch {testfile cpdir td1 td2} msg] $msg
} {1 {td1 ENOENT}}
-test winFCmd-8.1 {TraversalCopy: DOTREE_F} {win} {
+test winFCmd-8.1 {TraversalCopy: DOTREE_F} {win testfile} {
cleanup
file mkdir td1
list [catch {testfile cpdir td1 td1} msg] $msg
} {1 {td1 EEXIST}}
-test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} {win} {
+test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} {win testfile testchmod} {
cleanup
file mkdir td1/td2
testchmod 000 td1
testfile cpdir td1 td2
list [file writable td1] [file writable td1/td2]
} {0 1}
-test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} {win} {
+test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} {win testfile} {
cleanup
file mkdir td1
testfile cpdir td1 td2
} {}
-test winFCmd-9.1 {TraversalDelete: DOTREE_F} {win} {
+test winFCmd-9.1 {TraversalDelete: DOTREE_F} {win testfile} {
cleanup
file mkdir td1
createfile td1/tf1
testfile rmdir -force td1
} {}
-test winFCmd-9.2 {TraversalDelete: DOTREE_F} {win 95} {
+test winFCmd-9.2 {TraversalDelete: DOTREE_F} {win 95 testfile} {
cleanup
file mkdir td1
set fd [open td1/tf1 w]
@@ -809,14 +804,14 @@ test winFCmd-9.2 {TraversalDelete: DOTREE_F} {win 95} {
close $fd
set msg
} {1 {td1\tf1 EACCES}}
-test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} {win} {
+test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} {win testfile testchmod} {
cleanup
file mkdir td1/td2
testchmod 000 td1
testfile rmdir -force td1
file exists td1
} {0}
-test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} {win} {
+test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} {win testfile} {
cleanup
file mkdir td1/td1/td3/td4/td5
testfile rmdir -force td1