diff options
author | dgp <dgp@users.sourceforge.net> | 2002-07-01 14:35:09 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-07-01 14:35:09 (GMT) |
commit | 3eeb6cda634b43eb2e12bbdc7bc6b70f1ffefbb8 (patch) | |
tree | cfb93447d503dbeab21fd2aa002114f59cb7dfeb /library/tcltest | |
parent | 453df7044062f9f79fff8b0a578fc2ade81bb829 (diff) | |
download | tcl-3eeb6cda634b43eb2e12bbdc7bc6b70f1ffefbb8.zip tcl-3eeb6cda634b43eb2e12bbdc7bc6b70f1ffefbb8.tar.gz tcl-3eeb6cda634b43eb2e12bbdc7bc6b70f1ffefbb8.tar.bz2 |
* tests/pkg/samename.tcl: restored. needed by pkgMkIndex.test.
* library/tcltest/tcltest.tcl: restored writeability testing of
-tmpdir, augmented by a special exception for the deafault value.
Diffstat (limited to 'library/tcltest')
-rw-r--r-- | library/tcltest/tcltest.tcl | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index ee98397..94a12b1 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.62 2002/07/01 04:56:11 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.63 2002/07/01 14:35:10 dgp Exp $ package require Tcl 8.3 ;# uses [glob -directory] namespace eval tcltest { @@ -650,15 +650,14 @@ namespace eval tcltest { file mkdir $directory } set directory [AcceptDirectory $directory] - # - # Would be good to test that the -tmpdir is a writeable - # directory, but then we need a default value that we - # can guarantee will pass the writeability test, and there - # doesn't seem to be one. - # - #if {![file writable $directory]} { - # return -code error "\"$directory\" is not writeable" - #} + if {![file writable $directory]} { + if {[string equal [workingDirectory] $directory]} { + # Special exception: accept the default value + # even if the directory is not writable + return $directory + } + return -code error "\"$directory\" is not writeable" + } return $directory } |