diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expr-old.test | 10 | ||||
-rw-r--r-- | tests/parseExpr.test | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index a90366e..32f737a 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -13,10 +13,10 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr-old.test,v 1.15 2002/07/26 18:51:02 msofer Exp $ +# RCS: @(#) $Id: expr-old.test,v 1.16 2002/08/05 03:24:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2.1 namespace import -force ::tcltest::* } @@ -899,9 +899,9 @@ if $gotT1 { } {1 {too many arguments for math function}} } -test expr-old-36.1 {ExprLooksLikeInt procedure} { - list [catch {expr 0289} msg] $msg -} {1 {"0289" is an invalid octal number}} +test expr-old-36.1 {ExprLooksLikeInt procedure} -body { + expr 0289 +} -returnCodes error -match glob -result {*invalid octal number*} test expr-old-36.2 {ExprLooksLikeInt procedure} { set x 0289 list [catch {expr {$x+1}} msg] $msg diff --git a/tests/parseExpr.test b/tests/parseExpr.test index 958c515..489e6d2 100644 --- a/tests/parseExpr.test +++ b/tests/parseExpr.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parseExpr.test,v 1.7 2001/12/06 10:59:18 dkf Exp $ +# RCS: @(#) $Id: parseExpr.test,v 1.8 2002/08/05 03:24:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -509,9 +509,11 @@ test parseExpr-16.4 {GetLexeme procedure, integer lexeme} { test parseExpr-16.5 {GetLexeme procedure, integer lexeme too big} {wideIntegerUnparsed} { list [catch {testexprparser {12345678901234567890} -1} msg] $msg } {1 {integer value too large to represent}} -test parseExpr-16.6 {GetLexeme procedure, bad integer lexeme} { - list [catch {testexprparser {0999} -1} msg] $msg -} {1 {"0999" is an invalid octal number}} + +test parseExpr-16.6 {GetLexeme procedure, bad integer lexeme} -body { + testexprparser {0999} -1 +} -returnCodes error -match glob -result {*invalid octal number*} + test parseExpr-16.7 {GetLexeme procedure, double lexeme} { testexprparser {0.999} -1 } {- {} 0 subexpr 0.999 1 text 0.999 0 {}} |