diff options
author | dgp <dgp@noemail.net> | 2002-07-01 14:35:09 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2002-07-01 14:35:09 (GMT) |
commit | 689576113ade06268ee68c2572794e02fbb1a4e8 (patch) | |
tree | cfb93447d503dbeab21fd2aa002114f59cb7dfeb /library | |
parent | 3ad570d02a595c82cbc19eeef8432f333263d019 (diff) | |
download | tcl-689576113ade06268ee68c2572794e02fbb1a4e8.zip tcl-689576113ade06268ee68c2572794e02fbb1a4e8.tar.gz tcl-689576113ade06268ee68c2572794e02fbb1a4e8.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.
FossilOrigin-Name: 22739d560cd8b1840e17fcf48336440b71dc8338
Diffstat (limited to 'library')
-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 } |