summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/compile.test11
1 files changed, 11 insertions, 0 deletions
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}