diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-07-05 10:38:42 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-07-05 10:38:42 (GMT) |
commit | a407e1e0a4496d94823146e2bacf89ba0d5634f5 (patch) | |
tree | baa4c102aff8ec62a52114ea6ce1cacb8237f8c7 /tests/macFCmd.test | |
parent | c8b71f046baf06c64c0bb2e7c5c295b0fc742f5e (diff) | |
download | tcl-a407e1e0a4496d94823146e2bacf89ba0d5634f5.zip tcl-a407e1e0a4496d94823146e2bacf89ba0d5634f5.tar.gz tcl-a407e1e0a4496d94823146e2bacf89ba0d5634f5.tar.bz2 |
Made many tests work properly when the current directory is not writable.
Added targets to unix/Makefile.in to facilitate testing of this situation.
Diffstat (limited to 'tests/macFCmd.test')
-rw-r--r-- | tests/macFCmd.test | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/macFCmd.test b/tests/macFCmd.test index dbe1fef..a6c7fa0 100644 --- a/tests/macFCmd.test +++ b/tests/macFCmd.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: macFCmd.test,v 1.9 2002/06/05 11:59:21 das Exp $ +# RCS: @(#) $Id: macFCmd.test,v 1.10 2002/07/05 10:38:43 dkf Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -18,6 +18,11 @@ if {[lsearch [namespace children] ::tcltest] == -1} { 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}]} { @@ -193,17 +198,6 @@ test macFCmd-4.7 {SetFileReadOnly - directory readonly} {macOnly notFileSharing} } {1 {cannot set a directory to read-only when File Sharing is turned off} {}} # cleanup +cd $oldcwd ::tcltest::cleanupTests return - - - - - - - - - - - - |