diff options
Diffstat (limited to 'tests/for.test')
-rw-r--r-- | tests/for.test | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/for.test b/tests/for.test index 7051bac..a3a2d7d 100644 --- a/tests/for.test +++ b/tests/for.test @@ -9,17 +9,13 @@ # 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.13 2006/08/02 20:03:37 das Exp $ +# RCS: @(#) $Id: for.test,v 1.14 2006/08/22 04:03:24 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } -# Constraint set on tests that depend on the exact format of the error messages -# of the pre-2006/07/05 expression parser (-DOLD_EXPR_PARSER=1) -testConstraint oldExprParser [expr {![testConstraint newExprParser]}] - # Basic "for" operation. test for-1.1 {TclCompileForCmd: missing initial command} { @@ -663,12 +659,16 @@ test for-6.6 {Tcl_ForObjCmd: error in initial command} -body { ("for" initial command) invoked from within "$z {set} {$i < 5} {incr i} {body}"}} -test for-6.7 {Tcl_ForObjCmd: error in test expression} -constraints {oldExprParser} -match glob -body { +test for-6.7 {Tcl_ForObjCmd: error in test expression} -body { set z for - list [catch {$z {set i 0} {i < 5} {incr i} {body}} msg] $msg $errorInfo -} -result {1 {syntax error in expression "i < 5": * preceding $*} {syntax error in expression "i < 5": * preceding $* - while executing -"$z {set i 0} {i < 5} {incr i} {body}"}} + catch {$z {set i 0} {i < 5} {incr i} {body}} + set errorInfo +} -result {invalid bareword "i" +in expression "i < 5"; +should be "$i" or "{i}" or "i(...)" or ... + (parsing expression "i < 5") + invoked from within +"$z {set i 0} {i < 5} {incr i} {body}"} test for-6.8 {Tcl_ForObjCmd: test expression is enclosed in quotes} { set z for set i 0 |