diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-04 08:50:24 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-04 08:50:24 -0500 |
commit | 8d6cbf5e6bc4e10e38b954763fa025caed517cc2 (patch) | |
tree | b4897b417188cf4df17a2ce7b39e71cedf18a54a /test | |
parent | 582e3c9fb2337c2f49faa73ac86dde25f4d56901 (diff) | |
parent | 60bba6e2052c281afe401247e10aebcb4c17049b (diff) |
Merge tag 'efi-2023-01-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-01-rc5-3
Documentation:
* Describe building documentation
UEFI:
* Add .data section to aarch64 EFI binaries and correct section flags
* Correct sorting of capsules when updating
* Populate console handles in system table
Other:
* Fix description of eth_env_[gs]et_enetaddr() return value
* Avoid endless loop in sound play command
Diffstat (limited to 'test')
-rw-r--r-- | test/unicode_ut.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/unicode_ut.c b/test/unicode_ut.c index 3547aeffe79..382b7965161 100644 --- a/test/unicode_ut.c +++ b/test/unicode_ut.c @@ -624,6 +624,31 @@ static int unicode_test_utf_to_upper(struct unit_test_state *uts) } UNICODE_TEST(unicode_test_utf_to_upper); +static int unicode_test_u16_strcasecmp(struct unit_test_state *uts) +{ + ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0); + ut_assert(u16_strcasecmp(u"aBcd", u"abcd") == 0); + ut_assert(u16_strcasecmp(u"abcd", u"abCd") == 0); + ut_assert(u16_strcasecmp(u"abcdE", u"abcd") > 0); + ut_assert(u16_strcasecmp(u"abcd", u"abcdE") < 0); + ut_assert(u16_strcasecmp(u"abcE", u"abcd") > 0); + ut_assert(u16_strcasecmp(u"abcd", u"abcE") < 0); + ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0); + ut_assert(u16_strcasecmp(u"abcd", u"abcd") == 0); + if (CONFIG_IS_ENABLED(EFI_UNICODE_CAPITALIZATION)) { + /* Cyrillic letters */ + ut_assert(u16_strcasecmp(u"\x043a\x043d\x0438\x0433\x0430", + u"\x041a\x041d\x0418\x0413\x0410") == 0); + ut_assert(u16_strcasecmp(u"\x043a\x043d\x0438\x0433\x0430", + u"\x041a\x041d\x0418\x0413\x0411") < 0); + ut_assert(u16_strcasecmp(u"\x043a\x043d\x0438\x0433\x0431", + u"\x041a\x041d\x0418\x0413\x0410") > 0); + } + + return 0; +} +UNICODE_TEST(unicode_test_u16_strcasecmp); + static int unicode_test_u16_strncmp(struct unit_test_state *uts) { ut_assert(u16_strncmp(u"abc", u"abc", 3) == 0); |