test: Add a helper to check the next line against a regex
Add a new ut_assert_nextline_regex() macro and ut_check_console_line_regex() helper to check console output against a regex pattern. This is useful when the exact output varies (e.g., file paths or line numbers in error messages). Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -451,6 +451,9 @@ ut_assert_nextlinen(fmt, args...)
|
||||
Assert that the next console output line matches up to the format
|
||||
string length
|
||||
|
||||
ut_assert_nextline_regex(pattern)
|
||||
Assert that the next console output line matches a regex pattern
|
||||
|
||||
ut_assert_nextline_empty()
|
||||
Assert that the next console output line is empty
|
||||
|
||||
|
||||
Reference in New Issue
Block a user