summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/var.test16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index d363563..c4bb0c5 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.12 2000/01/21 03:26:04 hobbs Exp $
+# RCS: @(#) $Id: var.test,v 1.13 2000/01/21 03:29:14 ericm Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -459,6 +459,20 @@ test var-7.13 {Tcl_VariableObjCmd, variable named ":"} {
p
}
} {{My name is ":"} :}
+test var-7.14 {Tcl_VariableObjCmd, array element parameter} {
+ catch {namespace eval test_ns_var { variable arrayvar(1) }} res
+ set res
+} "can't define \"arrayvar(1)\": name refers to an element in an array"
+test var-7.15 {Tcl_VariableObjCmd, array element parameter} {
+ catch {
+ namespace eval test_ns_var {
+ variable arrayvar
+ set arrayvar(1) x
+ variable arrayvar(1) y
+ }
+ } res
+ set res
+} "can't define \"arrayvar(1)\": name refers to an element in an array"
test var-8.1 {TclDeleteVars, "unset" traces are called with fully-qualified var names} {
catch {namespace delete test_ns_var}