From 921b7fc2d390563051d90b03dd32783de5e93446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 16 Aug 2023 21:08:55 +0200 Subject: tests: add tests on eval ternary operator with extra colon in value --- tests/unit/core/test-core-eval.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/unit') 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}}"); -- cgit v1.2.3