1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

tests: add eval tests on "raw" and "raw_hl" with escaped prefix

This commit is contained in:
Sébastien Helleu
2023-11-24 08:04:35 +01:00
parent e01fa0aac9
commit d4220e8144
+2
View File
@@ -492,6 +492,7 @@ TEST(CoreEval, EvalExpression)
/* test raw string with syntax highlighting */
WEE_CHECK_EVAL("", "${raw_hl:}");
WEE_CHECK_EVAL("test", "${raw_hl:test}");
WEE_CHECK_EVAL("\\${", "${raw_hl:\\${");
snprintf (str_value, sizeof (str_value),
"%s${info:version}%s",
gui_color_get_custom (config_eval_syntax_colors[0]),
@@ -551,6 +552,7 @@ TEST(CoreEval, EvalExpression)
/* test raw string */
WEE_CHECK_EVAL("", "${raw:}");
WEE_CHECK_EVAL("test", "${raw:test}");
WEE_CHECK_EVAL("\\${", "${raw:\\${");
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}");