mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: add result of utf8_char_size_screen in /debug unicode
This commit is contained in:
@@ -793,7 +793,8 @@ debug_unicode_char (unsigned int codepoint)
|
||||
ptr_hexa[0] = '\0';
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
"\t \"%s\" (U+%04X, %u, %s): %d %s/%s %d, %d %s/%s %d, %d, %d",
|
||||
"\t \"%s\" (U+%04X, %u, %s): %d %s/%s %d, %d %s/%s "
|
||||
"%d, %d, %d, %d",
|
||||
utf8_char,
|
||||
codepoint,
|
||||
codepoint,
|
||||
@@ -806,6 +807,7 @@ debug_unicode_char (unsigned int codepoint)
|
||||
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
width,
|
||||
utf8_char_size_screen (utf8_char),
|
||||
utf8_strlen_screen (utf8_char),
|
||||
gui_chat_strlen_screen (utf8_char));
|
||||
}
|
||||
@@ -827,7 +829,8 @@ debug_unicode_string (const char *string)
|
||||
"(hex codepoint, codepoint, UTF-8 sequence): "
|
||||
"strlen %s/%s "
|
||||
"utf8_strlen, gui_chat_strlen %s/%s "
|
||||
"wcwidth, utf8_strlen_screen, gui_chat_strlen_screen:"),
|
||||
"wcwidth, utf8_char_size_screen, utf8_strlen_screen, "
|
||||
"gui_chat_strlen_screen:"),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
|
||||
|
||||
@@ -215,9 +215,9 @@ TEST(CoreCommand, Debug)
|
||||
|
||||
/* test command "/debug unicode" */
|
||||
WEE_CMD_CORE(command_debug_unicode);
|
||||
WEE_CHECK_MSG_CORE(" \"\u00AD\" (U+00AD, 173, 0xC2 0xAD): 2 / 1, 1 / 1, 1, 1");
|
||||
WEE_CHECK_MSG_CORE(" \"\u00E9\" (U+00E9, 233, 0xC3 0xA9): 2 / 1, 1 / 1, 1, 1");
|
||||
WEE_CHECK_MSG_CORE(" \"\u200B\" (U+200B, 8203, 0xE2 0x80 0x8B): 3 / 1, 1 / 0, 0, 0");
|
||||
WEE_CHECK_MSG_CORE(" \"\u00AD\" (U+00AD, 173, 0xC2 0xAD): 2 / 1, 1 / 1, 1, 1, 1");
|
||||
WEE_CHECK_MSG_CORE(" \"\u00E9\" (U+00E9, 233, 0xC3 0xA9): 2 / 1, 1 / 1, 1, 1, 1");
|
||||
WEE_CHECK_MSG_CORE(" \"\u200B\" (U+200B, 8203, 0xE2 0x80 0x8B): 3 / 1, 1 / 0, 0, 0, 0");
|
||||
|
||||
/* test command "/debug windows" */
|
||||
/* TODO: write tests */
|
||||
|
||||
Reference in New Issue
Block a user