summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2005-10-22 03:37:27 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2005-10-22 03:37:27 (GMT)
commit2805d0901c017d0273089012097c326967cdd90d (patch)
tree846baa92ce8be3aba09bd820e253e9cf568b72c9
parent780cc5981704cb13704126d1ac5835a2e58a0a1d (diff)
downloadtcl-2805d0901c017d0273089012097c326967cdd90d.zip
tcl-2805d0901c017d0273089012097c326967cdd90d.tar.gz
tcl-2805d0901c017d0273089012097c326967cdd90d.tar.bz2
* tests/foreach.test (foreach-8.1): added test for [Bug 1189274]
-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}