test: Tidy up checking for console end

Use the ut_assert_console_end() function provided, rather than doing it
separately.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2024-08-22 07:58:03 -06:00
committed by Tom Rini
parent d3ac70aac4
commit e6f498e70b
13 changed files with 134 additions and 134 deletions

View File

@@ -19,7 +19,7 @@ static int lib_test_hush_pause(struct unit_test_state *uts)
ut_assertok(run_command("pause", 0));
console_record_readline(uts->actual_str, sizeof(uts->actual_str));
ut_asserteq_str("Press any key to continue...", uts->actual_str);
ut_assertok(ut_check_console_end(uts));
ut_assert_console_end();
/* Test provided message */
/* Cook a newline when the command is expected to pause */
@@ -27,7 +27,7 @@ static int lib_test_hush_pause(struct unit_test_state *uts)
ut_assertok(run_command("pause 'Prompt for pause...'", 0));
console_record_readline(uts->actual_str, sizeof(uts->actual_str));
ut_asserteq_str("Prompt for pause...", uts->actual_str);
ut_assertok(ut_check_console_end(uts));
ut_assert_console_end();
/* Test providing more than one params */
/* No newline cooked here since the command is expected to fail */