Skip to content

Commit

Permalink
Use color to report the final test result, even when running in parallel
Browse files Browse the repository at this point in the history
After the tests are run there is no more parallelism, so it should be less
likely that the control characters will introduce wierd artifacts.
  • Loading branch information
brson committed Aug 2, 2011
1 parent a601eb1 commit ce8cac5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ fn run_tests_console_(opts: &test_opts, tests: &test_desc[],

st.out.write_str(#fmt("\nresult: "));
if success {
write_ok(st.out, st.use_color);
} else { write_failed(st.out, st.use_color); }
// There's no parallelism at this point so it's safe to 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.passed, st.failed, st.ignored));

Expand Down

0 comments on commit ce8cac5

Please sign in to comment.