summaryrefslogtreecommitdiffstats
path: root/tests/parseExpr.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-09-07 17:14:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-09-07 17:14:25 (GMT)
commiteab556c974f895e7d22dc274d00437dfa0e4300d (patch)
treefc582d162b0cdfc9ac46327741a6131f4f1ad2c7 /tests/parseExpr.test
parentf91512470ea7f0152111a3f6126a8b7dbf23ac7e (diff)
parent27306c24b9e0af8fc80742dc287acbe68b072119 (diff)
downloadtcl-eab556c974f895e7d22dc274d00437dfa0e4300d.zip
tcl-eab556c974f895e7d22dc274d00437dfa0e4300d.tar.gz
tcl-eab556c974f895e7d22dc274d00437dfa0e4300d.tar.bz2
3401704 Allow function names like influence(), nanobot(), and 99bottles()
that have been parsed as missing operator syntax errors before with the form NUMBER + FUNCTION. ***POTENTIAL INCOMPATIBILITY***
Diffstat (limited to 'tests/parseExpr.test')
-rw-r--r--tests/parseExpr.test61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/parseExpr.test b/tests/parseExpr.test
index 7673dbe..1620a62 100644
--- a/tests/parseExpr.test
+++ b/tests/parseExpr.test
@@ -997,6 +997,67 @@ 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 {}}
+test parseExpr-22.2 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser nana() 3
+} -result {- {} 0 subexpr nan 1 text nan 0 {}}
+test parseExpr-22.3 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 2a() -1
+} -result {- {} 0 subexpr 2a() 1 operator 2a 0 {}}
+test parseExpr-22.4 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser nana() -1
+} -result {- {} 0 subexpr nana() 1 operator nana 0 {}}
+test parseExpr-22.5 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser nan9() -1
+} -result {- {} 0 subexpr nan9() 1 operator nan9 0 {}}
+test parseExpr-22.6 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 2_() -1
+} -result {- {} 0 subexpr 2_() 1 operator 2_ 0 {}}
+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 *
+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 *
+test parseExpr-22.11 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 1e-3_() -1
+} -returnCodes error -match glob -result *
+test parseExpr-22.12 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser naneq() -1
+} -returnCodes error -match glob -result *
+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*}
+test parseExpr-22.15 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 0o8 -1
+} -returnCodes error -match glob -result {*invalid octal number*}
+test parseExpr-22.16 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 0o08 -1
+} -returnCodes error -match glob -result {*invalid octal number*}
+test parseExpr-22.17 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 0b2 -1
+} -returnCodes error -match glob -result {*invalid binary number*}
+test parseExpr-22.18 {Bug 3401704} -constraints testexprparser -body {
+ testexprparser 0b02 -1
+} -returnCodes error -match glob -result {*invalid binary number*}
+
+
# cleanup
::tcltest::cleanupTests
return