diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/for.test | 15 |
2 files changed, 19 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2008-11-17 Alexandre Ferrieux <ferrieux@users.sourceforge.net> + + * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] + fixed earlier. + 2008-11-16 Jan Nijtmans <nijtmans@users.sf.net> * generic/tclTest.c: replace two times Tcl_SetResult with 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". |