summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 8969384..c675d63 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: var.test,v 1.22 2003/05/12 17:20:41 msofer Exp $
+# RCS: @(#) $Id: var.test,v 1.23 2004/04/28 13:11:35 msofer Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -272,6 +272,11 @@ test var-3.10 {MakeUpvar, } {
set msg
}
} {1 1}
+test var-3.11 {MakeUpvar, my var looks like array elem} -body {
+ catch {unset aaaaa}
+ set aaaaa 789789
+ upvar #0 aaaaa foo(bar)
+} -returnCodes 1 -result {bad variable name "foo(bar)": upvar won't create a scalar variable that looks like an array element}
if {[info commands testgetvarfullname] != {}} {
test var-4.1 {Tcl_GetVariableName, global variable} {