mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-17 02:15:02 +00:00
efi_selftest: Add geometric shapes character selftest
Draw symbols from Unicode's "Geometric shapes" page which translate to code page 437 code points 1-31. These are used by UEFI applications to draw user interfaces using EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. The output has to be checked manually on the screen for correctness. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
33b2899811
commit
e35feb99ab
1 changed files with 13 additions and 0 deletions
|
@ -60,6 +60,13 @@ static int execute(void)
|
||||||
u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"
|
u"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"
|
||||||
u"\u2500\u2500\u2500\u2500\u2518\n";
|
u"\u2500\u2500\u2500\u2500\u2518\n";
|
||||||
|
|
||||||
|
const u16 shapes[] =
|
||||||
|
u"Geometric shapes as described\n"
|
||||||
|
u"U+25B2 \u25B2 - Black up-pointing triangle\n"
|
||||||
|
u"U+25BA \u25BA - Black right-pointing pointer\n"
|
||||||
|
u"U+25BC \u25BC - Black down-pointing triangle\n"
|
||||||
|
u"U+25C4 \u25C4 - Black left-pointing pointer\n";
|
||||||
|
|
||||||
/* SetAttribute */
|
/* SetAttribute */
|
||||||
efi_st_printf("\nColor palette\n");
|
efi_st_printf("\nColor palette\n");
|
||||||
for (foreground = 0; foreground < 0x10; ++foreground) {
|
for (foreground = 0; foreground < 0x10; ++foreground) {
|
||||||
|
@ -160,6 +167,12 @@ static int execute(void)
|
||||||
return EFI_ST_FAILURE;
|
return EFI_ST_FAILURE;
|
||||||
}
|
}
|
||||||
efi_st_printf("\n");
|
efi_st_printf("\n");
|
||||||
|
ret = con_out->output_string(con_out, shapes);
|
||||||
|
if (ret != EFI_ST_SUCCESS) {
|
||||||
|
efi_st_error("OutputString failed for geometric shapes\n");
|
||||||
|
return EFI_ST_FAILURE;
|
||||||
|
}
|
||||||
|
efi_st_printf("\n");
|
||||||
|
|
||||||
return EFI_ST_SUCCESS;
|
return EFI_ST_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue