summaryrefslogtreecommitdiffstats
path: root/tests/env.test
diff options
context:
space:
mode:
authorrjohnson <rjohnson@noemail.net>1999-07-08 03:35:18 (GMT)
committerrjohnson <rjohnson@noemail.net>1999-07-08 03:35:18 (GMT)
commit28e6044f7a5d89412bf8f28d691c7b7f875afa02 (patch)
tree34e22c27c3841d5df08f879efc957eefdedf1a1d /tests/env.test
parentf76cdb1814c7787b84162d780f81a6118151e77c (diff)
downloadtcl-28e6044f7a5d89412bf8f28d691c7b7f875afa02.zip
tcl-28e6044f7a5d89412bf8f28d691c7b7f875afa02.tar.gz
tcl-28e6044f7a5d89412bf8f28d691c7b7f875afa02.tar.bz2
Improved test to handle empty env array - (will raise error)
FossilOrigin-Name: 49ec7aac3ecbb1585e0098aedd14def544070f20
Diffstat (limited to 'tests/env.test')
-rw-r--r--tests/env.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/env.test b/tests/env.test
index 23e04a6..6cf4ea7 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.7 1999/07/01 17:36:17 jenn Exp $
+# RCS: @(#) $Id: env.test,v 1.8 1999/07/08 03:35:18 rjohnson Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -173,6 +173,9 @@ test env-4.5 {unsetting international environment variables} {execCommandExists}
} "\ub6=\ua7"
test env-5.0 {corner cases - set a value, it should exist} {} {
+ if {[llength [array names env]] == 0} {
+ error "env array unexpectedly empty"
+ }
set temp [lindex [array names env] end]
set x $env($temp)
set env($temp) a