summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--tests/foreach.test15
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 56c255d..30f8d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-10-22 Miguel Sofer <msofer@users.sf.net>
+ * tests/foreach.test (foreach-8.1): added test for [Bug 1189274]
+
+2005-10-22 Miguel Sofer <msofer@users.sf.net>
+
* 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}