summaryrefslogtreecommitdiffstats
path: root/tests/for.test
diff options
context:
space:
mode:
authordas <das>2006-08-02 20:03:37 (GMT)
committerdas <das>2006-08-02 20:03:37 (GMT)
commit1cb22227799972e31fd2e85ec0bc738dd5e176be (patch)
tree13a07ee3d0d7210cea34074b87295ad955a75a52 /tests/for.test
parent9f9399bfc4d9360d78f52967530fd2070531a1d9 (diff)
downloadtcl-1cb22227799972e31fd2e85ec0bc738dd5e176be.zip
tcl-1cb22227799972e31fd2e85ec0bc738dd5e176be.tar.gz
tcl-1cb22227799972e31fd2e85ec0bc738dd5e176be.tar.bz2
* tests/compExpr-old.test: add 'oldExprParser' constraint to all tests
* tests/compExpr.test: that depend on the exact format of the error * tests/compile.test: messages of the pre-2006-07-05 expression * tests/expr-old.test: parser. The constraint is on by default (i.e. * tests/expr.test: those test still fail), but it can be turned * tests/for.test: off by passing '-constraints newExprParser' * tests/if.test: to tcltest, which will skip the 196 failing * tests/parseExpr.test: tests in the testsuite that are caused by * tests/while.test: the new expression parser error messages.
Diffstat (limited to 'tests/for.test')
-rw-r--r--tests/for.test8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/for.test b/tests/for.test
index 7c968f6..7051bac 100644
--- a/tests/for.test
+++ b/tests/for.test
@@ -9,13 +9,17 @@
# 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.12 2005/06/20 07:49:11 mdejong Exp $
+# RCS: @(#) $Id: for.test,v 1.13 2006/08/02 20:03:37 das 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} {
@@ -659,7 +663,7 @@ 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} -match glob -body {
+test for-6.7 {Tcl_ForObjCmd: error in test expression} -constraints {oldExprParser} -match glob -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 $*