mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
headless-browser: Improve output for failing tests a bit
- Colorize the "Test failed" part when stdout is a TTY - Add missing newlines in the output
This commit is contained in:
parent
1696411f66
commit
b86ca27692
1 changed files with 4 additions and 1 deletions
|
@ -243,7 +243,10 @@ static ErrorOr<TestResult> run_test(HeadlessWebContentView& view, StringView inp
|
|||
|
||||
bool color_output = isatty(STDOUT_FILENO);
|
||||
|
||||
dbgln("Test failed: {}", input_path);
|
||||
if (color_output)
|
||||
outln("\n\033[33;1mTest failed\033[0m: {}", input_path);
|
||||
else
|
||||
outln("\nTest failed: {}", input_path);
|
||||
|
||||
auto hunks = Diff::from_text(expectation, actual);
|
||||
for (auto const& hunk : hunks) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue