1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

headless-browser: Call fflush() between tests when running on TTY

This allows us to see the full test name without getting cut off by
stdio buffering. :^)
This commit is contained in:
Andreas Kling 2023-05-28 08:02:55 +02:00
parent ea54c58930
commit 6c81b90e5a

View file

@ -284,7 +284,9 @@ static ErrorOr<int> run_tests(HeadlessWebContentView& view, StringView test_root
out("{}/{}: {}", i + 1, tests.size(), LexicalPath::relative_path(test.input_path, test_root_path));
if (!is_tty)
if (is_tty)
fflush(stdout);
else
outln("");
test.result = TRY(run_test(view, test.input_path, test.expectation_path, test.mode));