From 984e58b8dfc72a94b8827802e7234f66ce8aa7e4 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 17 Nov 2008 08:11:45 +0000 Subject: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. --- ChangeLog | 5 +++++ tests/for.test | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dea3c40..81ce5f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-17 Alexandre Ferrieux + + * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] + fixed earlier. + 2008-11-16 Jan Nijtmans * 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". -- cgit v0.12