1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 23:06:38 +02:00

core: add evaluation of conditions in evaluation of expressions with "eval_cond:" (closes #1582)

This commit is contained in:
Sébastien Helleu
2020-11-14 09:28:46 +01:00
parent eb90a73fe8
commit b626df72fb
27 changed files with 574 additions and 468 deletions
+5
View File
@@ -384,6 +384,11 @@ TEST(CoreEval, EvalExpression)
/* test eval of substring */
WEE_CHECK_EVAL("\t", "${eval:${\\t}}");
/* test eval of condition */
WEE_CHECK_EVAL("0", "${eval_cond:}");
WEE_CHECK_EVAL("0", "${eval_cond:${buffer.number} == 2}");
WEE_CHECK_EVAL("1", "${eval_cond:${buffer.number} == 1}");
/* test value from extra_vars */
WEE_CHECK_EVAL("value", "${test}");