diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-10-12 20:14:36 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-10-12 20:14:36 +0200 |
commit | 8fc8f728d49110ac44d403977f42afbdaf9d371e (patch) | |
tree | bbda7dc06b38f535bfeed53c6ecc9d245eab04b2 /tests/unit/core/test-core-eval.cpp | |
parent | 9535f4a70be7fa67bf65b4dc88b9681b2b755c4c (diff) | |
download | weechat-8fc8f728d49110ac44d403977f42afbdaf9d371e.zip |
core: add reverse of string for screen in evaluation of expressions with "revscr:"
Diffstat (limited to 'tests/unit/core/test-core-eval.cpp')
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index 80476733e..0bb69701c 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -354,6 +354,18 @@ TEST(CoreEval, EvalExpression) /* test reverse of string */ WEE_CHECK_EVAL("!dlrow ,olleH", "${rev:Hello, world!}"); WEE_CHECK_EVAL("界世はちにんこ", "${rev:こんにちは世界}"); + WEE_CHECK_EVAL("!dlrow30F\x19 ,olleH", + "${rev:Hello, ${color:red}world!}"); + WEE_CHECK_EVAL("Hello, \x19" "F03world!", + "${rev:${rev:Hello, ${color:red}world!}}"); + + /* test reverse of string (for screen) */ + WEE_CHECK_EVAL("!dlrow ,olleH", "${revscr:Hello, world!}"); + WEE_CHECK_EVAL("界世はちにんこ", "${revscr:こんにちは世界}"); + WEE_CHECK_EVAL("!dlrow\x19" "F03 ,olleH", + "${revscr:Hello, ${color:red}world!}"); + WEE_CHECK_EVAL("Hello, \x19" "F03world!", + "${revscr:${revscr:Hello, ${color:red}world!}}"); /* test repeat of string */ WEE_CHECK_EVAL("", "${repeat:-1,x}"); |