summaryrefslogtreecommitdiffstats
path: root/tests/compile.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compile.test')
-rw-r--r--tests/compile.test22
1 files changed, 9 insertions, 13 deletions
diff --git a/tests/compile.test b/tests/compile.test
index 05602ac..b499b10 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -11,15 +11,11 @@
# 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.42 2006/08/02 20:03:37 das Exp $
+# RCS: @(#) $Id: compile.test,v 1.43 2006/08/22 04:03:23 dgp 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]]
@@ -261,14 +257,14 @@ 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} -constraints {oldExprParser} -body {
+test compile-11.7 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -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} -constraints {oldExprParser} -body {
+ p
+} -returnCodes error -match glob -result *
+test compile-11.8 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body {
proc p {} { set r [list foobar] ; expr {!a} }
- list [catch {p} msg] $msg
-} -match glob -result {1 {syntax error in expression "!a": * preceding $*}}
+ p
+} -returnCodes error -match glob -result *
test compile-11.9 {Tcl_Append*: ensure Tcl_ResetResult is used properly} {
proc p {} { set r [list foobar] ; llength "\{" }
list [catch {p} msg] $msg
@@ -317,14 +313,14 @@ 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} -constraints {oldExprParser} -body {
+test compile-12.3 {check for a buffer overrun} -body {
proc crash {} {
puts $array([expr {a+2}])
}
crash
} -returnCodes error -cleanup {
rename crash {}
-} -match glob -result {syntax error in expression "a+2": * preceding $*}
+} -match glob -result *
test compile-12.4 {TclCleanupLiteralTable segfault} -body {
# Tcl Bug 1001997
# Here, we're trying to test a case that causes a crash in