Skip to content

Commit

Permalink
Check for non-empty stderr
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Ross-Perkins <[email protected]>
  • Loading branch information
dwblaikie and jonmeow authored Jan 16, 2025
1 parent 7d9f632 commit a6d8a42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions toolchain/testing/file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ class ToolchainFileTest : public FileTestBase {
}

Driver driver(fs, &installation_, stdout, stderr);
auto loc_before = stderr.tell();
auto driver_result = driver.RunCommand(test_args);
// If any diagnostics have been produced, add a trailing newline to make the
// last diagnostic match intermediate diagnostics (that have a newline
// separator between them). This reduces churn when adding new diagnostics
// to test cases.
if (loc_before != stderr.tell()) {
if (stderr.tell() > 0) {
stderr << '\n';
}

Expand Down

0 comments on commit a6d8a42

Please sign in to comment.