1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

core: add raw string in evaluation of expressions with "raw:xxx" (closes #1611)

This commit is contained in:
Sébastien Helleu
2021-02-05 20:07:16 +01:00
parent 64fe602aae
commit a93e598c35
27 changed files with 643 additions and 556 deletions
+6
View File
@@ -465,6 +465,12 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("", "${}");
WEE_CHECK_EVAL("", "${xyz}");
/* test raw string */
WEE_CHECK_EVAL("${info:version}", "${raw:${info:version}}");
WEE_CHECK_EVAL("yes", "${if:${raw:test?}==${raw:test?}?yes:no}");
WEE_CHECK_EVAL("no", "${if:${raw:test?}==${raw:test}?yes:no}");
WEE_CHECK_EVAL("16", "${length:${raw:${buffer.number}}}");
/* test eval of substring */
WEE_CHECK_EVAL("\t", "${eval:${\\t}}");