summaryrefslogtreecommitdiffstats
path: root/tests/foreach.test
diff options
context:
space:
mode:
authortwylite <twylite@crypt.co.za>2012-08-03 16:39:49 (GMT)
committertwylite <twylite@crypt.co.za>2012-08-03 16:39:49 (GMT)
commit79878e7af5ae502d353130a4cca867147152bfc2 (patch)
tree6d4e5f813c3379eb7aebf2fa65aaf0e7fe13dbd3 /tests/foreach.test
parent94af10e431bdb850d1bb4352c03153b1f78015b8 (diff)
downloadtcl-79878e7af5ae502d353130a4cca867147152bfc2.zip
tcl-79878e7af5ae502d353130a4cca867147152bfc2.tar.gz
tcl-79878e7af5ae502d353130a4cca867147152bfc2.tar.bz2
[Patch-3163961] Implementation of TIP #405 merged from private branch. Includes 'mapeach', 'dict map' and 'foreacha' commands, test suite (partial for 'foreacha') and man pages (except for 'foreacha').
Diffstat (limited to 'tests/foreach.test')
-rw-r--r--tests/foreach.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/foreach.test b/tests/foreach.test
index a4b652a..6c69b29 100644
--- a/tests/foreach.test
+++ b/tests/foreach.test
@@ -266,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}