aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2021-01-03 00:52:13 +1000
committerSteve Bennett <steveb@workware.net.au>2021-01-03 00:52:13 +1000
commita432a96ecae0fa93d76e602510719cef931916e2 (patch)
treeeaf92b093a334cb18018fba5e203c5a04c1f148b /tests
parent6d4bc31fd4ad3c3fe5338349436e7f18b6543321 (diff)
downloadjimtcl-a432a96ecae0fa93d76e602510719cef931916e2.zip
jimtcl-a432a96ecae0fa93d76e602510719cef931916e2.tar.gz
jimtcl-a432a96ecae0fa93d76e602510719cef931916e2.tar.bz2
core: fix parsing of booleans
When boolean parsing was combined in commit 982ec4f524bc81a240cb729cf09bd3c677aea485 it broken parsing of boolean values in expressions that weren't standalone. e.g. expr {true} was fine, but expr {true ? 4 : 5} was not. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/expr.test b/tests/expr.test
index d73ddbc..f1c6cc6 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -150,4 +150,9 @@ test expr-5.2 "Not" -body {
expr {!this}
} -returnCodes error -result {syntax error in expression: "!this"}
+test expr-5.3 {boolean in expression} {
+ expr {true ? 4 : 5}
+} {4}
+
+
testreport