diff options
| author | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-05-26 23:46:55 +0200 |
|---|---|---|
| committer | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-05-26 23:51:13 +0200 |
| commit | 909cbbeda81f64fe9d92e2d4fe5325cc9a4a327a (patch) | |
| tree | a0874069b6f34e0804ac944d22df8e8f4892c6d8 /src/libtest | |
| parent | d3543099d60d2bc68491ffd9691d4ee5d7f9d082 (diff) | |
| download | rust-909cbbeda81f64fe9d92e2d4fe5325cc9a4a327a.tar.gz rust-909cbbeda81f64fe9d92e2d4fe5325cc9a4a327a.zip | |
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 #782.
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 575f29b3bc9..da86e727c68 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -740,7 +740,7 @@ fn should_sort_failures_before_printing_them() { fn use_color(opts: &TestOpts) -> bool { match opts.color { - AutoColor => get_concurrency() == 1 && stdout_isatty(), + AutoColor => !opts.nocapture && stdout_isatty(), AlwaysColor => true, NeverColor => false, } |
