From 2805d0901c017d0273089012097c326967cdd90d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 22 Oct 2005 03:37:27 +0000 Subject: * tests/foreach.test (foreach-8.1): added test for [Bug 1189274] --- ChangeLog | 4 ++++ tests/foreach.test | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 56c255d..30f8d76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-10-22 Miguel Sofer + * tests/foreach.test (foreach-8.1): added test for [Bug 1189274] + +2005-10-22 Miguel Sofer + * generic/tclExecute.c (INST_INCR_*): fixed [Bug 1334570]. Obj leak detection and patch by Eric Melbardis. diff --git a/tests/foreach.test b/tests/foreach.test index 9f4b5b0..abb88f4 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.9 2003/03/27 13:19:15 dkf Exp $ +# RCS: @(#) $Id: foreach.test,v 1.10 2005/10/22 03:37:27 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -233,6 +233,19 @@ test foreach-7.1 {delayed substitution of body} { foo } {0} + +# Test for [Bug 1189274]; crash on failure + +test foreach-8.1 {empty list handling} { + proc crash {} { + rename crash {} + set a "x y z" + set b "" + foreach aa $a bb $b { set x "aa = $aa bb = $bb" } + } + crash +} {} + # cleanup catch {unset a} catch {unset x} -- cgit v0.12