mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 14:56:03 +00:00
efi_selftest: Improve the FatToStr() unit test
Add a test with a character >= 0x80. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
caf29d1e64
commit
6717a03d30
1 changed files with 12 additions and 0 deletions
|
@ -184,6 +184,18 @@ static int test_fat_to_str(void)
|
||||||
return EFI_ST_FAILURE;
|
return EFI_ST_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boottime->set_mem(str, sizeof(str), 0);
|
||||||
|
unicode_collation_protocol->fat_to_str(unicode_collation_protocol, 13,
|
||||||
|
"Kafb\240tur\000xyz", str);
|
||||||
|
if (str[10]) {
|
||||||
|
efi_st_error("fat_to_str returned to many characters\n");
|
||||||
|
return EFI_ST_FAILURE;
|
||||||
|
}
|
||||||
|
if (efi_st_strcmp_16_8(str, "Kafb\341tur")) {
|
||||||
|
efi_st_error("fat_to_str returned \"%ps\"\n", str);
|
||||||
|
return EFI_ST_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
return EFI_ST_SUCCESS;
|
return EFI_ST_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue