diff options
author | Janne Grunau <j@jannau.net> | 2024-03-16 22:50:23 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-03-21 06:56:13 +0100 |
commit | e35feb99ab82c36355bcb09fc7c3aad321e56825 (patch) | |
tree | 8913adbcd7f7f76e541f0977e8ad73f1cba56285 /lib | |
parent | 33b28998119004f89a662fb3f96e49d0bd9b99a0 (diff) | |
download | u-boot-e35feb99ab82c36355bcb09fc7c3aad321e56825.tar.gz |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_selftest/efi_selftest_textoutput.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selftest/efi_selftest_textoutput.c index 889b2678ff5..a3023c82567 100644 --- a/lib/efi_selftest/efi_selftest_textoutput.c +++ b/lib/efi_selftest/efi_selftest_textoutput.c @@ -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\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 */ efi_st_printf("\nColor palette\n"); for (foreground = 0; foreground < 0x10; ++foreground) { @@ -160,6 +167,12 @@ static int execute(void) return EFI_ST_FAILURE; } 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; } |