Index: tests/env.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/env.test,v
retrieving revision 1.25
diff -u -r1.25 env.test
--- tests/env.test	21 Mar 2006 14:33:24 -0000	1.25
+++ tests/env.test	21 Mar 2006 15:28:30 -0000
@@ -103,24 +103,18 @@
 # Save the current environment variables at the start of the test.
 
 foreach name [array names env] {
-    set env2([string toupper $name]) $env($name)
-    unset env($name)
-}
+    set env2($name) $env($name)
 
-# Added the following lines so that child tcltest can actually find its
-# library if the initial tcltest is run from a non-standard place.
-# ('saved' env vars)
-foreach name {
-    TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH
-    DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH SYSTEMDRIVE SYSTEMROOT
-} {
-    if {[info exists env2($name)]} {
-	set env($name) $env2($name);
+    # Keep some environment variables that support operation of the
+    # tcltest package.
+    if {[string toupper $name] ni {
+	    TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH
+	    DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH SYSTEMDRIVE SYSTEMROOT
+    }} {
+	unset env($name)
     }
 }
 
-#array set env [array get env2 S*]
-
 test env-2.1 {adding environment variables} {exec} {
     getenv
 } {}
