diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-03-01 10:16:09 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-03-01 10:16:09 (GMT) |
commit | bbd1a40279d2d032cb29ed36ce0ed0e6105f16c8 (patch) | |
tree | 3a2cdb549c109b3cc5f7794e2dcfb3988d7f35da /tests | |
parent | 26963260767dbf3573cc0b7a260372a5bac01be8 (diff) | |
download | tcl-bbd1a40279d2d032cb29ed36ce0ed0e6105f16c8.zip tcl-bbd1a40279d2d032cb29ed36ce0ed0e6105f16c8.tar.gz tcl-bbd1a40279d2d032cb29ed36ce0ed0e6105f16c8.tar.bz2 |
Fix [Bug 1671138]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/foreach.test | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/foreach.test b/tests/foreach.test index 0ab6340..ee90ce2 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.1 2003/03/27 13:11:01 dkf Exp $ +# RCS: @(#) $Id: foreach.test,v 1.8.8.2 2007/03/01 10:16:10 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -233,6 +233,16 @@ test foreach-7.1 {delayed substitution of body} { foo } {0} +# [Bug 1671138]; infinite loop with empty var list in bytecompiled version +test foreach-9.1 {compiled empty var list} { + proc foo {} { + foreach {} x { + error "reached body" + } + } + list [catch { foo } msg] $msg +} {1 {foreach varlist is empty}} + # cleanup catch {unset a} catch {unset x} |