summaryrefslogtreecommitdiffstats
path: root/tests/compile.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/compile.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/compile.test')
-rw-r--r--tests/compile.test12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/compile.test b/tests/compile.test
index b7d4ffa..05602ac 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -11,11 +11,15 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: compile.test,v 1.41 2006/02/09 17:34:42 dgp Exp $
+# RCS: @(#) $Id: compile.test,v 1.42 2006/08/02 20:03:37 das Exp $
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]}]
+
testConstraint exec [llength [info commands exec]]
testConstraint memory [llength [info commands memory]]
testConstraint testevalex [llength [info commands testevalex]]
@@ -257,11 +261,11 @@ test compile-11.6 {Tcl_Append*: ensure Tcl_ResetResult is used properly} {
proc p {} { set r [list foobar] ; incr}
list [catch {p} msg] $msg
} {1 {wrong # args: should be "incr varName ?increment?"}}
-test compile-11.7 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
+test compile-11.7 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -constraints {oldExprParser} -body {
proc p {} { set r [list foobar] ; expr !a }
list [catch {p} msg] $msg
} -match glob -result {1 {syntax error in expression "!a": * preceding $*}}
-test compile-11.8 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
+test compile-11.8 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -constraints {oldExprParser} -body {
proc p {} { set r [list foobar] ; expr {!a} }
list [catch {p} msg] $msg
} -match glob -result {1 {syntax error in expression "!a": * preceding $*}}
@@ -313,7 +317,7 @@ test compile-12.2 {testing error on literal deletion} -constraints {memory exec}
catch {removeFile $sourceFile}
} -result 0
# Test to catch buffer overrun in TclCompileTokens from buf 530320
-test compile-12.3 {check for a buffer overrun} -body {
+test compile-12.3 {check for a buffer overrun} -constraints {oldExprParser} -body {
proc crash {} {
puts $array([expr {a+2}])
}