Skip to content

Commit 245db82

Browse files
jooertXMPPwocky
authored andcommitted
Enable colored test output when capturing output of tests
The output of individual tests can be captured now so it's safe to use colorized output even when running tests in parallel. Closes rust-lang#782.
1 parent dc83d3a commit 245db82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libtest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ fn should_sort_failures_before_printing_them() {
740740

741741
fn use_color(opts: &TestOpts) -> bool {
742742
match opts.color {
743-
AutoColor => get_concurrency() == 1 && stdout_isatty(),
743+
AutoColor => !opts.nocapture && stdout_isatty(),
744744
AlwaysColor => true,
745745
NeverColor => false,
746746
}

0 commit comments

Comments
 (0)