diff options
author | Tom Rini <trini@konsulko.com> | 2019-02-13 07:12:29 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-02-13 07:12:29 -0500 |
commit | 63f7e3fca391a50a499fed828fe16325fdee45f3 (patch) | |
tree | 6214d5fe9a24d21b9a729a1bda3fdd22e442d298 /test | |
parent | b1b1bab7f92b838a252ab977f56d9c3584c14fb7 (diff) | |
parent | 823c233b7ab95169ea4428b2821b72b8887b47b0 (diff) |
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Patch queue for efi - 2019-02-13
Goodness this time around:
- HII protocol, finally allows us to run the UEFI Shell!
(experimantal, disabled by default)
- efi selftest now available on Cortex-M
- NVMe support for distro boot
- Lots of code cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/unicode_ut.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unicode_ut.c b/test/unicode_ut.c index b115d18afd..84fc9a3b53 100644 --- a/test/unicode_ut.c +++ b/test/unicode_ut.c @@ -50,6 +50,29 @@ static const char j1[] = {0x6a, 0x31, 0xa1, 0x6c, 0x00}; static const char j2[] = {0x6a, 0x32, 0xc3, 0xc3, 0x6c, 0x00}; static const char j3[] = {0x6a, 0x33, 0xf0, 0x90, 0xf0, 0x00}; +static int ut_u16_strdup(struct unit_test_state *uts) +{ + u16 *copy = u16_strdup(c4); + + ut_assert(copy != c4); + ut_assert(!memcmp(copy, c4, sizeof(c4))); + free(copy); + return 0; +} +UNICODE_TEST(ut_u16_strdup); + +static int ut_u16_strcpy(struct unit_test_state *uts) +{ + u16 *r; + u16 copy[10]; + + r = u16_strcpy(copy, c1); + ut_assert(r == copy); + ut_assert(!memcmp(copy, c1, sizeof(c1))); + return 0; +} +UNICODE_TEST(ut_u16_strcpy); + /* U-Boot uses UTF-16 strings in the EFI context only. */ #if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) static int ut_string16(struct unit_test_state *uts) |