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/unixFile.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/unixFile.test')
-rw-r--r-- | tests/unixFile.test | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/tests/unixFile.test b/tests/unixFile.test index c046e71..cc3b9b4 100644 --- a/tests/unixFile.test +++ b/tests/unixFile.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unixFile.test,v 1.6 2000/04/10 17:19:05 ericm Exp $ +# RCS: @(#) $Id: unixFile.test,v 1.7 2002/07/05 10:38:43 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -23,12 +23,14 @@ if {[info commands testobj] == {}} { return } +set oldpwd [pwd] +cd [temporaryDirectory] + catch { set oldPath $env(PATH) - close [open junk w] - file attributes junk -perm 0777 + file attributes [makeFile "" junk] -perm 0777 } -set absPath [file join [pwd] junk] +set absPath [file join [temporaryDirectory] junk] test unixFile-1.1 {Tcl_FindExecutable} {unixOnly} { set env(PATH) "" @@ -61,18 +63,7 @@ test unixFile-1.7 {Tcl_FindExecutable} {unixOnly} { # cleanup catch {set env(PATH) $oldPath} -file delete junk +removeFile junk +cd $oldpwd ::tcltest::cleanupTests return - - - - - - - - - - - - |