summaryrefslogtreecommitdiffstats
path: root/tests/upvar.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/upvar.test')
-rw-r--r--tests/upvar.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/upvar.test b/tests/upvar.test
index dcc2e23..ed9ce1d 100644
--- a/tests/upvar.test
+++ b/tests/upvar.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: upvar.test,v 1.8 2003/11/14 20:44:47 dgp Exp $
+# RCS: @(#) $Id: upvar.test,v 1.9 2004/04/28 13:11:35 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -336,6 +336,11 @@ test upvar-8.10 {upvar will create element alias for new array element} {
array set upvarArray {}
catch {upvar 0 upvarArray(elem) upvarArrayElemAlias}
} {0}
+test upvar-8.11 {upvar will not create a variable that looks like an array} -body {
+ catch {unset upvarArray}
+ array set upvarArray {}
+ upvar 0 upvarArray(elem) upvarArrayElemAlias(elem)
+} -returnCodes 1 -match glob -result *
if {[info commands testupvar] != {}} {
test upvar-9.1 {Tcl_UpVar2 procedure} {