diff --git a/src/builtin_test.cpp b/src/builtin_test.cpp index bac2d9381..95d45942c 100644 --- a/src/builtin_test.cpp +++ b/src/builtin_test.cpp @@ -810,11 +810,11 @@ int builtin_test(parser_t &parser, io_streams_t &streams, wchar_t **argv) { expression *expr = test_parser::parse_args(args, err, program_name); if (!expr) { #if 0 - fwprintf(stderr, L"Oops! test was given args:\n"); + streams.err.append(L"Oops! test was given args:\n"); for (size_t i=0; i < argc; i++) { - fwprintf(stderr, L"\t%ls\n", args.at(i).c_str()); + streams.err.append_format(L"\t%ls\n", args.at(i).c_str()); } - fwprintf(stderr, L"and returned parse error: %ls\n", err.c_str()); + streams.err.append_format(L"and returned parse error: %ls\n", err.c_str()); #endif streams.err.append(err); return BUILTIN_TEST_FAIL; @@ -823,9 +823,9 @@ int builtin_test(parser_t &parser, io_streams_t &streams, wchar_t **argv) { wcstring_list_t eval_errors; bool result = expr->evaluate(eval_errors); if (!eval_errors.empty() && !should_suppress_stderr_for_tests()) { - fwprintf(stderr, L"test returned eval errors:\n"); + streams.err.append(L"test returned eval errors:\n"); for (size_t i = 0; i < eval_errors.size(); i++) { - fwprintf(stderr, L"\t%ls\n", eval_errors.at(i).c_str()); + streams.err.append_format(L"\t%ls\n", eval_errors.at(i).c_str()); } } delete expr;