summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/expr.n2
-rw-r--r--tests/expr.test10
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/expr.n b/doc/expr.n
index f4bb2ff..e9b30a5 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -50,7 +50,7 @@ the end of the expression, whichever comes first.
.PP
An expression consists of a combination of operands, operators, parentheses and
commas, possibly with whitespace between any of these elements, which is
-ignored. Each operand is intepreted as a numeric value if at all possible.
+ignored. Each operand is interpreted as a numeric value if at all possible.
.PP
Each operand has one of the following forms:
.RS
diff --git a/tests/expr.test b/tests/expr.test
index 5c1f6d9..62b1c27 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -137,9 +137,9 @@ proc do_twelve_days {} {
catch {unset a b i x}
-test expr-1.1 {TclCompileExprCmd: no expression} {
- list [catch {expr } msg] $msg
-} {1 {wrong # args: should be "expr arg ?arg ...?"}}
+test expr-1.1 {TclCompileExprCmd: no expression} -body {
+ expr
+} -returnCodes error -result {wrong # args: should be "expr arg ?arg ...?"}
test expr-1.2 {TclCompileExprCmd: one expression word} {
expr -25
} -25
@@ -186,12 +186,12 @@ test expr-1.13 {TclCompileExprCmd: second level of substitutions in expr not in
} foo
test expr-1.14 {TclCompileExprCmd: second level of substitutions in expr with comparison as top-level operator} {
set a xxx
- set x 2; set b {$x}; set a [expr $b == 2]
+ set x 2; set b {$x}; set a [expr $b==2]
set a
} 1
test expr-1.15 {TclCompileExprCmd: second level of substitutions in expr with comparison as top-level operator} {
set a xxx
- set x 2; set b {$x}; set a [expr $b eq 2]
+ set x 2; set b {$x}; set a [expr "$b eq 2"]
set a
} 1