summaryrefslogtreecommitdiff
path: root/tests/unit/core/test-core-eval.cpp
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-16 21:08:55 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-16 21:08:55 +0200
commit921b7fc2d390563051d90b03dd32783de5e93446 (patch)
tree24bf9bda66cff44889082e519feb9b51b1a0f9d1 /tests/unit/core/test-core-eval.cpp
parent8b9cdc83298a55fa799b67714b9f3a824277bec9 (diff)
downloadweechat-921b7fc2d390563051d90b03dd32783de5e93446.zip
tests: add tests on eval ternary operator with extra colon in value
Diffstat (limited to 'tests/unit/core/test-core-eval.cpp')
-rw-r--r--tests/unit/core/test-core-eval.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp
index ab6925fd3..5c758e8ed 100644
--- a/tests/unit/core/test-core-eval.cpp
+++ b/tests/unit/core/test-core-eval.cpp
@@ -828,6 +828,8 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("yes", "${if:5>2?yes:no}");
WEE_CHECK_EVAL("no", "${if:1>7?yes:no}");
WEE_CHECK_EVAL("yes", "${if:5>2 && 6>3?yes:no}");
+ WEE_CHECK_EVAL("yes", "${if:1?yes:no:test}");
+ WEE_CHECK_EVAL("no:test", "${if:0?yes:no:test}");
WEE_CHECK_EVAL("yes-yes", "${if:5>2?${if:6>3?yes-yes:yes-no}:${if:9>4?no-yes:no-no}}");
WEE_CHECK_EVAL("yes-no", "${if:5>2?${if:1>7?yes-yes:yes-no}:${if:9>4?no-yes:no-no}}");
WEE_CHECK_EVAL("no-yes", "${if:1>7?${if:6>3?yes-yes:yes-no}:${if:9>4?no-yes:no-no}}");