summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenn <jenn>1999-07-08 17:29:30 (GMT)
committerjenn <jenn>1999-07-08 17:29:30 (GMT)
commitfde896cb6ef22460005ab1efe939aec06b4ed9ad (patch)
treeefb819d1ab74f382510b2986be922625be6f7321
parentc047428bcb434fa7796ebe29234e4181528e5291 (diff)
downloadtcl-fde896cb6ef22460005ab1efe939aec06b4ed9ad.zip
tcl-fde896cb6ef22460005ab1efe939aec06b4ed9ad.tar.gz
tcl-fde896cb6ef22460005ab1efe939aec06b4ed9ad.tar.bz2
Do additional checks to unset any environment variables set, changed or
created by the tests.
-rw-r--r--tests/rename.test18
-rw-r--r--tests/unixInit.test22
2 files changed, 12 insertions, 28 deletions
diff --git a/tests/rename.test b/tests/rename.test
index d938469..1c1f0f6 100644
--- a/tests/rename.test
+++ b/tests/rename.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: rename.test,v 1.6 1999/06/30 00:17:36 jenn Exp $
+# RCS: @(#) $Id: rename.test,v 1.7 1999/07/08 17:29:30 jenn Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -132,6 +132,9 @@ if {[info command testdel] == "testdel"} {
testdel foo cmd {set env(value) deleted; kill}
list [catch {interp delete foo} msg] $msg $env(value)
} {0 {} deleted}
+ if {[info exists env(value)]} {
+ unset env(value)
+ }
}
# Save the unknown procedure which is modified by the following test.
@@ -173,16 +176,3 @@ if {[info commands incr.old] != {}} {
}
::tcltest::cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/unixInit.test b/tests/unixInit.test
index 9426ec6..7073cc6 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -10,14 +10,17 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixInit.test,v 1.9 1999/07/07 23:08:13 rjohnson Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.10 1999/07/08 17:29:30 jenn Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import ::tcltest::*
}
-catch {set oldlibrary $env(TCL_LIBRARY); unset env(TCL_LIBRARY)}
+if {[info exists env(TCL_LIBRARY)]} {
+ set oldlibrary $env(TCL_LIBRARY)
+ unset env(TCL_LIBRARY)
+}
catch {set oldlang $env(LANG)}
set env(LANG) C
@@ -191,19 +194,10 @@ test unixInit-6.1 {Tcl_SourceRCFile} {emptyTest unixOnly} {
} {}
# cleanup
-catch {unset env(TCL_LIBRARY); set env(TCL_LIBRARY) $oldlibrary}
+if {[info exists oldlibrary]} {
+ set env(TCL_LIBRARY) $oldlibrary
+}
catch {unset env(LANG); set env(LANG) $oldlang}
::tcltest::cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-