Subject: New test compile-5.3 for the bug.

From: dgp <[email-masked]>
Date: Fri, 11 Mar 2016 15:00:51 +0000

---
 tests/compile.test | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/compile.test b/tests/compile.test
index 46e678a..bb12050 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -224,6 +224,17 @@ test compile-5.2 {TclCompileForeachCmd: non-local variables} {
     foreach-test
     set ::foo
 } 3
+test compile-5.3 {TclCompileForeachCmd: [Bug b9b2079e6d]} -setup {
+    proc demo {} {
+	foreach x y {
+	    if 1 break else
+	}
+    }
+} -body {
+    demo
+} -cleanup {
+    rename demo {}
+} -returnCodes error -result {wrong # args: no script following "else" argument}
 
 test compile-6.1 {TclCompileSetCmd: global scalar names with ::s} -setup {
     catch {unset x}
-- 
cgit v0.12