diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-17 20:25:07 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-18 14:13:14 +0100 |
commit | eb6cc0bc2afa96824667521d3405bd1c077a4690 (patch) | |
tree | a59c1e7205b18fb4bc16dba3915d0da4770e55e1 /tests | |
parent | 6aedddd351d8103c6e46283ca3aca7aa4a04f149 (diff) | |
download | weechat-eb6cc0bc2afa96824667521d3405bd1c077a4690.zip |
core: return number of bytes for UTF-8 char in function utf8_int_string
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/core/test-core-utf8.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/core/test-core-utf8.cpp b/tests/unit/core/test-core-utf8.cpp index 26f42bde2..7051e1478 100644 --- a/tests/unit/core/test-core-utf8.cpp +++ b/tests/unit/core/test-core-utf8.cpp @@ -458,16 +458,16 @@ TEST(CoreUtf8, Convert) LONGS_EQUAL(0x92d, utf8_char_int (utf8_4bytes_truncated_3)); /* convert unicode char to a string */ - utf8_int_string (0, NULL); - utf8_int_string (0, result); + LONGS_EQUAL(0, utf8_int_string (0, NULL)); + LONGS_EQUAL(0, utf8_int_string (0, result)); STRCMP_EQUAL("", result); - utf8_int_string (235, result); + LONGS_EQUAL(2, utf8_int_string (L'ë', result)); STRCMP_EQUAL("ë", result); - utf8_int_string (0x20ac, result); + LONGS_EQUAL(3, utf8_int_string (L'€', result)); STRCMP_EQUAL("€", result); - utf8_int_string (0x2ee9, result); + LONGS_EQUAL(3, utf8_int_string (0x2ee9, result)); STRCMP_EQUAL(UNICODE_CJK_YELLOW, result); - utf8_int_string (0x24b62, result); + LONGS_EQUAL(4, utf8_int_string (0x24b62, result)); STRCMP_EQUAL(UNICODE_HAN_CHAR, result); /* get wide char */ |