test/py: Unicode w/ EFI_SIMPLE_TEXT_INPUT_PROTOCOL
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 11 Sep 2018 20:38:03 +0000 (22:38 +0200)
committerAlexander Graf <agraf@suse.de>
Sun, 23 Sep 2018 19:55:30 +0000 (21:55 +0200)
Test that the Euro sign is correctly retrieved from the console via the
EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
test/py/tests/test_efi_selftest.py

index 994d2e22410e8887c29cb8449dd0ec44e83bb1c0..5d0dba6f4efa7a7623ef1cc0e646f66ba5d0d05f 100644 (file)
@@ -100,6 +100,13 @@ def test_efi_selftest_text_input(u_boot_console):
        if m != 0:
                raise Exception('UP failed in \'text input\' test')
        u_boot_console.drain_console()
+       # Euro sign
+       u_boot_console.run_command(cmd='\xe2\x82\xac', wait_for_echo=False,
+                                  send_nl=False, wait_for_prompt=False)
+       m = u_boot_console.p.expect(['Unicode char 8364'])
+       if m != 0:
+               raise Exception('Euro sign failed in \'text input\' test')
+       u_boot_console.drain_console()
        u_boot_console.run_command(cmd='x', wait_for_echo=False, send_nl=False,
                                   wait_for_prompt=False)
        m = u_boot_console.p.expect(['Summary: 0 failures', 'Press any key'])