diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-16 21:08:55 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-08-16 21:08:55 +0200 |
commit | 921b7fc2d390563051d90b03dd32783de5e93446 (patch) | |
tree | 24bf9bda66cff44889082e519feb9b51b1a0f9d1 /tests/unit | |
parent | 8b9cdc83298a55fa799b67714b9f3a824277bec9 (diff) | |
download | weechat-921b7fc2d390563051d90b03dd32783de5e93446.zip |
tests: add tests on eval ternary operator with extra colon in value
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 2 |
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}}"); |