diff options
Diffstat (limited to 'tests/expr-new.test')
-rw-r--r-- | tests/expr-new.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/expr-new.test b/tests/expr-new.test index c04da05..f81c911 100644 --- a/tests/expr-new.test +++ b/tests/expr-new.test @@ -627,6 +627,19 @@ test expr-21.7 {checking boolean mixed case} { } } 1 +# This test won't fail if shimmering isn't handled +# correctly, but it will leak memory. configure with --maintainer +# to see the issue. +test expr-21.1 {expr shimmering} { + set x {[a] + 2} + proc a {} { + upvar x x + # make the expression become a list while we are executing it + lindex $x 2 + } + expr $x +} {4} + # cleanup if {[info exists a]} { unset a |