mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 18:23:13 +02:00
core: add reverse of string for screen in evaluation of expressions with "revscr:"
This commit is contained in:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user