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