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