mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-24 17:41:16 -03:00
Suppress certain stderr-printing during tests
Tests that exercise error paths may result in output to stderr. This may make it look like the test failed when it did not. Introduce should_suppress_stderr_for_tests() to suppress this output so the test output looks clean.
This commit is contained in:
@@ -708,7 +708,8 @@ parse_execution_result_t parse_execution_context_t::report_errors(
|
||||
parser->get_backtrace(src, error_list, &backtrace_and_desc);
|
||||
|
||||
// Print it.
|
||||
fprintf(stderr, "%ls", backtrace_and_desc.c_str());
|
||||
if (! should_suppress_stderr_for_tests())
|
||||
fprintf(stderr, "%ls", backtrace_and_desc.c_str());
|
||||
}
|
||||
return parse_execution_errored;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user