summaryrefslogtreecommitdiffstats
path: root/tests/foreach.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/foreach.test')
-rw-r--r--tests/foreach.test11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/foreach.test b/tests/foreach.test
index 4042b3c..6c69b29 100644
--- a/tests/foreach.test
+++ b/tests/foreach.test
@@ -9,8 +9,6 @@
#
# 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.15 2009/06/24 15:17:40 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -268,6 +266,15 @@ test foreach-10.1 {foreach: [Bug 1671087]} -setup {
rename demo {}
} -result {}
+test foreach-11.1 {error then dereference loop var (dev bug)} {
+ catch { foreach a 0 b {1 2 3} { error x } }
+ set a
+} 0
+test foreach-11.2 {error then dereference loop var (dev bug)} {
+ catch { foreach a 0 b {1 2 3} { incr a $b; error x } }
+ set a
+} 1
+
# cleanup
catch {unset a}
catch {unset x}