summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-28 08:02:55 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-28 08:03:52 +0200
commit6c81b90e5a06d6fb2164f6484c7e69b0492aa87f (patch)
tree140d3ac102eaf78a187a59465f2a7be5ba983ed3 /Userland/Utilities
parentea54c589301c224c429ffd8f368ae11d15780e45 (diff)
downloadserenity-6c81b90e5a06d6fb2164f6484c7e69b0492aa87f.zip
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. :^)
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/headless-browser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp
index a6ff09f96e..bdb74dc881 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -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));