diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | tests/env.test | 24 |
2 files changed, 13 insertions, 15 deletions
@@ -1,3 +1,7 @@ +2006-03-21 Don Porter <dgp@users.sourceforge.net> + + * tests/env.test: Preserve case of saved env vars. [Bug 1409272] + 2006-03-21 Daniel Steffen <das@users.sourceforge.net> * generic/tclInt.decls: implement globbing for HFS creator & type diff --git a/tests/env.test b/tests/env.test index 293cd60..f388f67 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.25 2006/03/21 14:33:24 dgp Exp $ +# RCS: @(#) $Id: env.test,v 1.26 2006/03/21 15:32:17 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -103,24 +103,18 @@ proc getenv {} { # 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 } {} |