summaryrefslogtreecommitdiffstats
path: root/tests/for.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/for.test')
-rw-r--r--tests/for.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/for.test b/tests/for.test
index 8665df6..04aed84 100644
--- a/tests/for.test
+++ b/tests/for.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: for.test,v 1.16 2006/10/09 19:15:44 msofer Exp $
+# RCS: @(#) $Id: for.test,v 1.17 2008/11/17 08:11:45 ferrieux Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -199,6 +199,19 @@ test for-2.6 {continue tests, long command body} {
}
set a
} {1 3}
+test for-2.7 {continue tests, uncompiled [for]} -body {
+ set file [makeFile {
+ set guard 0
+ for {set i 20} {$i > 0} {incr i -1} {
+ if {[incr guard]>30} {return BAD}
+ continue
+ }
+ return GOOD
+ } source.file]
+ source $file
+} -cleanup {
+ removeFile source.file
+} -result GOOD
# Check "for" and "break".