summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-06-16 22:24:12 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-06-16 22:24:12 (GMT)
commitdceff402a0bef88886de4f644b0b312b86f021e0 (patch)
tree4c3f263eaf133a5ef6884f640d65aa4cd3f89143 /tests
parent9f5e83a07bc6c07bee76ef80ffc94146b02adacd (diff)
downloadtcl-dceff402a0bef88886de4f644b0b312b86f021e0.zip
tcl-dceff402a0bef88886de4f644b0b312b86f021e0.tar.gz
tcl-dceff402a0bef88886de4f644b0b312b86f021e0.tar.bz2
[Bug 569438] in the processing of dollar variables
Diffstat (limited to 'tests')
-rw-r--r--tests/compile.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/compile.test b/tests/compile.test
index aef9ac0..64a72f7 100644
--- a/tests/compile.test
+++ b/tests/compile.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: compile.test,v 1.19 2002/04/15 17:32:18 msofer Exp $
+# RCS: @(#) $Id: compile.test,v 1.20 2002/06/16 22:24:12 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -72,6 +72,15 @@ test compile-2.4 {TclCompileDollarVar: global scalar name with ::s} {
}
list [p] $::a(1) [expr {[lsearch -exact [info globals] a] != 0}]
} {1 1 1}
+test compile-2.5 {TclCompileDollarVar: global array, called as ${arrName(0)}} {
+ catch {unset a}
+ proc p {} {
+ global a
+ set a(1) 1
+ return ${a(1)}$::a(1)$a(1)
+ }
+ list [p] $::a(1) [expr {[lsearch -exact [info globals] a] != 0}]
+} {111 1 1}
test compile-3.1 {TclCompileCatchCmd: only catch cmds with scalar vars are compiled inline} {
catch {unset a}