summaryrefslogtreecommitdiffstats
path: root/tests/while.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-08-22 04:03:23 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-08-22 04:03:23 (GMT)
commita9e01d92cd36a6bd0e284252cb645ebe343c7c36 (patch)
tree3c2ba6753261f2925bdb82db20c562b7454c6adf /tests/while.test
parent3154c0f487e39f1d7ad82415bcb33fcfc614593b (diff)
downloadtcl-a9e01d92cd36a6bd0e284252cb645ebe343c7c36.zip
tcl-a9e01d92cd36a6bd0e284252cb645ebe343c7c36.tar.gz
tcl-a9e01d92cd36a6bd0e284252cb645ebe343c7c36.tar.bz2
* tests/compExpr-old.test: Update existing tests to not fail
* tests/compExpr.test: with the new expr parser. * tests/compile.test: * tests/expr-old.test: * tests/expr.test: * tests/for.test: * tests/if.test: * tests/parseExpr.test: * tests/while.test:
Diffstat (limited to 'tests/while.test')
-rw-r--r--tests/while.test22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/while.test b/tests/while.test
index d317883..411ba20 100644
--- a/tests/while.test
+++ b/tests/while.test
@@ -10,17 +10,13 @@
# 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.10 2006/08/02 20:03:37 das Exp $
+# RCS: @(#) $Id: while.test,v 1.11 2006/08/22 04:03:24 dgp 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}
@@ -30,12 +26,14 @@ 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} -constraints {oldExprParser} -body {
+test while-1.2 {TclCompileWhileCmd: error in test expression} -body {
set i 0
catch {while {$i<} break} msg
set errorInfo
-} -match glob -result {syntax error in expression "$i<": premature end of expression*
- while *ing
+} -result {missing operand at _@_
+in expression "$i<_@_"
+ (parsing expression "$i<")
+ invoked from within
"while {$i<} break"}
test while-1.3 {TclCompileWhileCmd: error in test expression} {
set err [catch {while {"a"+"b"} {error "loop aborted"}} msg]
@@ -305,13 +303,15 @@ 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} {oldExprParser} {
+test while-4.3 {while (not compiled): error in test expression} {
set i 0
set z while
catch {$z {$i<} {set x 1}} msg
set errorInfo
-} {syntax error in expression "$i<": premature end of expression
- while executing
+} {missing operand at _@_
+in expression "$i<_@_"
+ (parsing expression "$i<")
+ invoked from within
"$z {$i<} {set x 1}"}
test while-4.4 {while (not compiled): error in test expression} {
set z while