summaryrefslogtreecommitdiffstats
path: root/tests/parseExpr.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parseExpr.test')
-rw-r--r--tests/parseExpr.test67
1 files changed, 7 insertions, 60 deletions
diff --git a/tests/parseExpr.test b/tests/parseExpr.test
index c1c489b..0f62b91 100644
--- a/tests/parseExpr.test
+++ b/tests/parseExpr.test
@@ -7,9 +7,13 @@
#
# 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.29 2007/12/13 15:26:07 dgp Exp $
-package require tcltest 2
-namespace import ::tcltest::*
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2
+ namespace import -force ::tcltest::*
+}
# Note that the Tcl expression parser (tclCompExpr.c) does not check
# the semantic validity of the expressions it parses. It does not check,
@@ -995,63 +999,6 @@ test parseExpr-21.63 {error message} -body {
} -returnCodes error -result "missing close-brace
in expression \"...12345678901234567890*\[\{abcdefghijklmnopqrstuv...\""
-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
-cleanupTests
+::tcltest::cleanupTests
return