1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

core: add case conversion in evaluation of expressions (closes #1778)

This commit is contained in:
Sébastien Helleu
2022-04-18 13:46:16 +02:00
parent 46033a7ee9
commit 51ed9ec93e
30 changed files with 7594 additions and 4617 deletions
+10
View File
@@ -516,6 +516,16 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("\t", "${\\t}");
WEE_CHECK_EVAL("\t", "${esc:\t}");
/* test case conversion: to lower case */
WEE_CHECK_EVAL("", "${lower:}");
WEE_CHECK_EVAL("this is a test", "${lower:This is a TEST}");
WEE_CHECK_EVAL("testÉ testé", "${lower:TESTÉ Testé}");
/* test case conversion: to upper case */
WEE_CHECK_EVAL("", "${upper:}");
WEE_CHECK_EVAL("THIS IS A TEST", "${upper:This is a TEST}");
WEE_CHECK_EVAL("TESTÉ TESTé", "${upper:TESTÉ Testé}");
/* test hidden chars */
WEE_CHECK_EVAL("", "${hide:invalid}");
WEE_CHECK_EVAL("********", "${hide:*,password}");