diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2008-11-17 08:11:45 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2008-11-17 08:11:45 (GMT) |
commit | 984e58b8dfc72a94b8827802e7234f66ce8aa7e4 (patch) | |
tree | 586fb94af7b62cb51ddaef7c9edd2a1984aa1349 /tests | |
parent | 97cffdf748033bc48656674844a82e30d9aae794 (diff) | |
download | tcl-984e58b8dfc72a94b8827802e7234f66ce8aa7e4.zip tcl-984e58b8dfc72a94b8827802e7234f66ce8aa7e4.tar.gz tcl-984e58b8dfc72a94b8827802e7234f66ce8aa7e4.tar.bz2 |
Check for uncompiled-for-continue [Bug 2186888] fixed earlier.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/for.test | 15 |
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". |