aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expr-old.test2
-rw-r--r--tests/expr.test25
2 files changed, 13 insertions, 14 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 0bd9b53..f5422eb 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -747,7 +747,7 @@ test expr-old-34.2 {errors in math functions} -body {
test expr-old-34.3 {errors in math functions} -body {
expr {hypot("a b", 2.0)}
} -returnCodes error -match glob -result *
-test expr-old-34.4 {errors in math functions} -constraints tcl -body {
+test expr-old-34.4 {errors in math functions} -body {
expr {hypot(1.0 2.0)}
} -returnCodes error -match glob -result *
test expr-old-34.5 {errors in math functions} -body {
diff --git a/tests/expr.test b/tests/expr.test
index 682af89..dbe84f5 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -83,22 +83,21 @@ test expr-1.17 "Rotate left" jim {
} {2}
# This crashes older jim
-test expr-2.1 "bogus unarymin" {
- catch {expr {unarymin 1}}
- return 1
-} {1}
+test expr-2.1 "bogus unarymin" -body {
+ expr {unarymin 1}
+} -returnCodes error -match glob -result *
-test expr-2.2 "Ternary operator - missing colon" {
- list [catch {expr {1 ? 2 3}} msg]
-} {1}
+test expr-2.2 "Ternary operator - missing colon" -body {
+ expr {1 ? 2 3}
+} -returnCodes error -match glob -result {missing operator*}
-test expr-2.3 "Ternary operator - missing third term" {
- list [catch {expr {1 ? 2}} msg]
-} {1}
+test expr-2.3 "Ternary operator - missing third term" -body {
+ expr {1 ? 2}
+} -returnCodes error -match glob -result *
-test expr-2.4 "Ternary operator - missing question" {
- list [catch {expr {1 : 2}} msg]
-} {1}
+test expr-2.4 "Ternary operator - missing question" -body {
+ expr {1 : 2}
+} -returnCodes error -match glob -result *
test expr-3.1 "in, ni operators" {
set l {a b c d}