u-boot/test/common
Yurii Monakov 2dd86b9075 cli: Consume invalid escape sequences early
Unexpected 'Esc' key presses are accumulated internally, even if it is
already clear that the current escape sequence is invalid. This results
in weird behaviour. For example, the next character after 'Esc' key
simply disappears from input and 'Unknown command' is printed
after 'Enter'.

This commit fixes some issues with extra 'Esc' keys entered by user:

1. Sequence <Esc><Esc><Enter> right after autoboot stop gives:
=>
nknown command 'ry 'help'
=>
2. Sequence <Esc><p><r><i><Enter> gives:
=> ri
Unknown command 'ri' - try 'help'
=>
3. Extra 'Esc' key presses break backspace functionality.

Signed-off-by: Yurii Monakov <monakov.y@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24 16:34:45 -04:00
..
cmd_ut_common.c test: add first autoboot unit tests 2021-07-23 13:36:20 -04:00
cread.c cli: Consume invalid escape sequences early 2023-10-24 16:34:45 -04:00
cyclic.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
event.c event: Support a simple spy record 2023-08-31 13:16:54 -04:00
Makefile test: build dependency for event unit tests 2023-09-30 15:15:31 -04:00
test_autoboot.c sandbox: Reduce keyed autoboot delay 2021-08-01 09:05:24 -06:00