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:
@@ -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}}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user