Use color to report the final test result, even when running in parallel

After the tests are run there is no more parallelism, so it should be less
likely that the control characters will introduce wierd artifacts.
This commit is contained in:
Brian Anderson
2011-08-01 11:13:55 -07:00
parent a601eb169e
commit ce8cac5d9a

View File

@@ -171,8 +171,9 @@ fn run_tests_console_(opts: &test_opts, tests: &test_desc[],
st.out.write_str(#fmt("\nresult: ")); st.out.write_str(#fmt("\nresult: "));
if success { if success {
write_ok(st.out, st.use_color); // There's no parallelism at this point so it's safe to use color
} else { write_failed(st.out, st.use_color); } write_ok(st.out, true);
} else { write_failed(st.out, true); }
st.out.write_str(#fmt(". %u passed; %u failed; %u ignored\n\n", st.out.write_str(#fmt(". %u passed; %u failed; %u ignored\n\n",
st.passed, st.failed, st.ignored)); st.passed, st.failed, st.ignored));