about summary refs log tree commit diff
path: root/src/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtest')
-rw-r--r--src/libtest/lib.rs4
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 {