summaryrefslogtreecommitdiffstats
path: root/tests/dict.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-06-06 21:01:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-06-06 21:01:04 (GMT)
commit89472a2027d1ef3616e36b9067d5b2ccca84b3e0 (patch)
tree229ccfba37110d85676becb3409b3782560eea6d /tests/dict.test
parent1486f60b5f64b30894635c951cc50d6aeb2cc8a1 (diff)
downloadtcl-89472a2027d1ef3616e36b9067d5b2ccca84b3e0.zip
tcl-89472a2027d1ef3616e36b9067d5b2ccca84b3e0.tar.gz
tcl-89472a2027d1ef3616e36b9067d5b2ccca84b3e0.tar.bz2
More efficient instruction sequence for [dict for] with correct exception depth handling.
Diffstat (limited to 'tests/dict.test')
-rw-r--r--tests/dict.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/dict.test b/tests/dict.test
index 72a336c..02c9050 100644
--- a/tests/dict.test
+++ b/tests/dict.test
@@ -668,6 +668,24 @@ test dict-14.20 {dict for stack space compilation: bug 1903325} {
concat "c=$y,$args"
}} {} 1 2 3
} {c=1,2 3}
+test dict-14.21 {compiled dict for and break} {
+ apply {{} {
+ dict for {a b} {c d e f} {
+ lappend result $a,$b
+ break
+ }
+ return $result
+ }}
+} c,d
+test dict-14.22 {dict for and exception range depths: Bug 3614382} {
+ apply {{} {
+ dict for {a b} {c d} {
+ dict for {e f} {g h} {
+ return 5
+ }
+ }
+ }}
+} 5
# There's probably a lot more tests to add here. Really ought to use a
# coverage tool for this job...