summaryrefslogtreecommitdiffstats
path: root/tests/unixFile.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2002-07-05 10:38:41 (GMT)
committerdkf <dkf@noemail.net>2002-07-05 10:38:41 (GMT)
commit3132b7240c527cf71ec48e2773717959c990af5e (patch)
treebaa4c102aff8ec62a52114ea6ce1cacb8237f8c7 /tests/unixFile.test
parent62f5a36b192ced66f838b1a9a6e3973ffe932b1f (diff)
downloadtcl-3132b7240c527cf71ec48e2773717959c990af5e.zip
tcl-3132b7240c527cf71ec48e2773717959c990af5e.tar.gz
tcl-3132b7240c527cf71ec48e2773717959c990af5e.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. FossilOrigin-Name: 725b23357f2845f2c1d887777bc6ed9dd86a8161
Diffstat (limited to 'tests/unixFile.test')
-rw-r--r--tests/unixFile.test25
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
-
-
-
-
-
-
-
-
-
-
-
-