summaryrefslogtreecommitdiff
path: root/test/unicode_ut.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-09-12 00:05:32 +0200
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:30 +0200
commit35cbb796aa85dadeb5451104c536a33acf1ebcfe (patch)
tree454c631a5c4590fd5c0246c76f4a4fd3fb02bc81 /test/unicode_ut.c
parentcce289a928583a64db6ec8f813cc7884ae62c213 (diff)
efi_loader: support Unicode text input
Up to now the EFI_TEXT_INPUT_PROTOCOL only supported ASCII characters. With the patch it can consume UTF-8 from the console. Currently only the serial console and the console can deliver UTF-8. Local consoles are restricted to ASCII. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'test/unicode_ut.c')
-rw-r--r--test/unicode_ut.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index b94b4a651f..b115d18afd 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -178,7 +178,7 @@ static int ut_utf8_utf16_strlen(struct unit_test_state *uts)
/* illegal utf-8 sequences */
ut_asserteq(4, utf8_utf16_strlen(j1));
- ut_asserteq(5, utf8_utf16_strlen(j2));
+ ut_asserteq(4, utf8_utf16_strlen(j2));
ut_asserteq(3, utf8_utf16_strlen(j3));
return 0;
@@ -196,7 +196,7 @@ static int ut_utf8_utf16_strnlen(struct unit_test_state *uts)
/* illegal utf-8 sequences */
ut_asserteq(4, utf8_utf16_strnlen(j1, 16));
- ut_asserteq(5, utf8_utf16_strnlen(j2, 16));
+ ut_asserteq(4, utf8_utf16_strnlen(j2, 16));
ut_asserteq(3, utf8_utf16_strnlen(j3, 16));
return 0;
@@ -255,8 +255,8 @@ static int ut_utf8_utf16_strcpy(struct unit_test_state *uts)
pos = buf;
utf8_utf16_strcpy(&pos, j2);
- ut_asserteq(5, pos - buf);
- ut_assert(!ut_u16_strcmp(buf, L"j2??l", SIZE_MAX));
+ ut_asserteq(4, pos - buf);
+ ut_assert(!ut_u16_strcmp(buf, L"j2?l", SIZE_MAX));
pos = buf;
utf8_utf16_strcpy(&pos, j3);