diff options
author | dkf <dkf@noemail.net> | 2002-07-05 10:38:41 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2002-07-05 10:38:41 (GMT) |
commit | 3132b7240c527cf71ec48e2773717959c990af5e (patch) | |
tree | baa4c102aff8ec62a52114ea6ce1cacb8237f8c7 /tests/env.test | |
parent | 62f5a36b192ced66f838b1a9a6e3973ffe932b1f (diff) | |
download | tcl-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/env.test')
-rw-r--r-- | tests/env.test | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/env.test b/tests/env.test index ce14fed..1fbec90 100644 --- a/tests/env.test +++ b/tests/env.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: env.test,v 1.14 2002/06/22 04:19:47 dgp Exp $ +# RCS: @(#) $Id: env.test,v 1.15 2002/07/05 10:38:42 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -60,8 +60,7 @@ test env-1.3 {reflection of env by "array names"} { # Skip them if exec is not defined. ::tcltest::testConstraint execCommandExists [expr {[info commands exec] != ""}] -set f [open printenv w] -puts $f { +set printenvScript [makeFile { proc lrem {listname name} { upvar $listname list set i [lsearch $list $name] @@ -85,12 +84,11 @@ puts $f { puts "$p=$env($p)" } exit -} -close $f +} printenv] proc getenv {} { - global printenv tcltest - catch {exec $::tcltest::tcltest printenv} out + global printenvScript tcltest + catch {exec $::tcltest::tcltest $printenvScript} out if {$out == "child process exited abnormally"} { set out {} } @@ -244,7 +242,7 @@ foreach name [array names env2] { } # cleanup -file delete printenv +removeFile $printenvScript ::tcltest::cleanupTests return |