summaryrefslogtreecommitdiffstats
path: root/tests/while.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/while.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/while.test')
-rw-r--r--tests/while.test10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/while.test b/tests/while.test
index 0352da4..d317883 100644
--- a/tests/while.test
+++ b/tests/while.test
@@ -10,13 +10,17 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: while.test,v 1.9 2004/09/26 16:36:06 msofer Exp $
+# RCS: @(#) $Id: while.test,v 1.10 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 "while" operation.
catch {unset i}
@@ -26,7 +30,7 @@ test while-1.1 {TclCompileWhileCmd: missing test expression} {
catch {while } msg
set msg
} {wrong # args: should be "while test command"}
-test while-1.2 {TclCompileWhileCmd: error in test expression} -body {
+test while-1.2 {TclCompileWhileCmd: error in test expression} -constraints {oldExprParser} -body {
set i 0
catch {while {$i<} break} msg
set errorInfo
@@ -301,7 +305,7 @@ test while-4.2 {while (not compiled): missing test expression} {
catch {$z } msg
set msg
} {wrong # args: should be "while test command"}
-test while-4.3 {while (not compiled): error in test expression} {
+test while-4.3 {while (not compiled): error in test expression} {oldExprParser} {
set i 0
set z while
catch {$z {$i<} {set x 1}} msg