diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-04-18 13:46:16 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-04-18 13:46:16 +0200 |
commit | 51ed9ec93e7f9562ffdca693f24d3a90c904d019 (patch) | |
tree | 2abb14ee2c891e1df54b356c848b81dcbf1bc132 /tests/unit/core/test-core-eval.cpp | |
parent | 46033a7ee9c1a8f59967fe79b1d22de9a25c4eb3 (diff) | |
download | weechat-51ed9ec93e7f9562ffdca693f24d3a90c904d019.zip |
core: add case conversion in evaluation of expressions (closes #1778)
Diffstat (limited to 'tests/unit/core/test-core-eval.cpp')
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index bc53c5ee6..e1d9a3cff 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -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}"); |