diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile.test | 11 |
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} |