summaryrefslogtreecommitdiffstats
path: root/tests/parseExpr.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parseExpr.test')
-rw-r--r--tests/parseExpr.test49
1 files changed, 27 insertions, 22 deletions
diff --git a/tests/parseExpr.test b/tests/parseExpr.test
index 1620a62..cd0342a 100644
--- a/tests/parseExpr.test
+++ b/tests/parseExpr.test
@@ -997,10 +997,6 @@ test parseExpr-21.63 {error message} -body {
} -returnCodes error -result "missing close-brace
in expression \"...12345678901234567890*\[\{abcdefghijklmnopqrstuv...\""
-test parseExpr-18.1 {LogSyntaxError procedure, error in expr longer than 60 chars} -constraints testexprparser -body {
- testexprparser {(+0123456)*(+0123456)*(+0123456)*(+0123456)*(+0123456)*(+0123456)*(+0123456)/} -1
-} -returnCodes error -match glob -result *
-
test parseExpr-22.1 {Bug 3401704} -constraints testexprparser -body {
testexprparser 2a() 1
} -result {- {} 0 subexpr 2 1 text 2 0 {}}
@@ -1023,39 +1019,48 @@ test parseExpr-22.7 {Bug 3401704} -constraints testexprparser -body {
testexprparser nan_() -1
} -result {- {} 0 subexpr nan_() 1 operator nan_ 0 {}}
test parseExpr-22.8 {Bug 3401704} -constraints testexprparser -body {
- testexprparser nan!() -1
-} -returnCodes error -match glob -result *
+ catch {testexprparser nan!() -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR MISSING}
test parseExpr-22.9 {Bug 3401704} -constraints testexprparser -body {
testexprparser 1e3_() -1
} -result {- {} 0 subexpr 1e3_() 1 operator 1e3_ 0 {}}
test parseExpr-22.10 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 1.3_() -1
-} -returnCodes error -match glob -result *
+ catch {testexprparser 1.3_() -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADCHAR}
test parseExpr-22.11 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 1e-3_() -1
-} -returnCodes error -match glob -result *
+ catch {testexprparser 1e-3_() -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADCHAR}
test parseExpr-22.12 {Bug 3401704} -constraints testexprparser -body {
- testexprparser naneq() -1
-} -returnCodes error -match glob -result *
+ catch {testexprparser naneq() -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR EMPTY}
test parseExpr-22.13 {Bug 3401704} -constraints testexprparser -body {
testexprparser naner() -1
} -result {- {} 0 subexpr naner() 1 operator naner 0 {}}
test parseExpr-22.14 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 08 -1
-} -returnCodes error -match glob -result {*invalid octal number*}
+ catch {testexprparser 08 -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADNUMBER OCTAL}
test parseExpr-22.15 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 0o8 -1
-} -returnCodes error -match glob -result {*invalid octal number*}
+ catch {testexprparser 0o8 -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADNUMBER OCTAL}
test parseExpr-22.16 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 0o08 -1
-} -returnCodes error -match glob -result {*invalid octal number*}
+ catch {testexprparser 0o08 -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADNUMBER OCTAL}
test parseExpr-22.17 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 0b2 -1
-} -returnCodes error -match glob -result {*invalid binary number*}
+ catch {testexprparser 0b2 -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADNUMBER BINARY}
test parseExpr-22.18 {Bug 3401704} -constraints testexprparser -body {
- testexprparser 0b02 -1
-} -returnCodes error -match glob -result {*invalid binary number*}
+ catch {testexprparser 0b02 -1} m o
+ dict get $o -errorcode
+} -result {TCL PARSE EXPR BADNUMBER BINARY}
# cleanup