summaryrefslogtreecommitdiffstats
path: root/tests/compile.test
diff options
context:
space:
mode:
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}])
}