summaryrefslogtreecommitdiffstats
path: root/tests/env.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/env.test')
-rw-r--r--tests/env.test14
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