diff options
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index bc69dc442dc..35911949ea4 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -868,7 +868,9 @@ fn should_sort_failures_before_printing_them() { assert!(apos < bpos); } -fn use_color() -> bool { return get_concurrency() == 1; } +fn use_color() -> bool { + get_concurrency() == 1 && io::stdout().get_ref().isatty() +} #[deriving(Clone)] enum TestEvent { |
