diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/foreach.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/foreach.test b/tests/foreach.test index ee90ce2..a260576 100644 --- a/tests/foreach.test +++ b/tests/foreach.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: foreach.test,v 1.8.8.2 2007/03/01 10:16:10 dkf Exp $ +# RCS: @(#) $Id: foreach.test,v 1.8.8.3 2007/03/13 16:26:33 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -243,6 +243,18 @@ test foreach-9.1 {compiled empty var list} { list [catch { foo } msg] $msg } {1 {foreach varlist is empty}} +test foreach-10.1 {foreach: [Bug 1671087]} -setup { + proc demo {} { + set vals {1 2 3 4} + trace add variable x write {string length $vals ;# } + foreach {x y} $vals {format $y} + } +} -body { + demo +} -cleanup { + rename demo {} +} -result {} + # cleanup catch {unset a} catch {unset x} |