summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-12 10:25:09 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-14 07:46:29 -0800
commitee2a888860ea496b5a972ed35fb742b4ae008233 (patch)
tree249171a9397fb0a961bb7d19dff6f25e8f587ac1 /src/libstd/io
parent665555d58f2aa3c1d8aecd7b34392bde6c41b20d (diff)
downloadrust-ee2a888860ea496b5a972ed35fb742b4ae008233.tar.gz
rust-ee2a888860ea496b5a972ed35fb742b4ae008233.zip
extra: Capture stdout/stderr of tests by default
When tests fail, their stdout and stderr is printed as part of the summary, but
this helps suppress failure messages from #[should_fail] tests and generally
clean up the output of the test runner.
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/comm_adapters.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/comm_adapters.rs b/src/libstd/io/comm_adapters.rs
index 6ed588ac69f..bf2c6dbb623 100644
--- a/src/libstd/io/comm_adapters.rs
+++ b/src/libstd/io/comm_adapters.rs
@@ -96,6 +96,12 @@ impl ChanWriter {
     }
 }
 
+impl Clone for ChanWriter {
+    fn clone(&self) -> ChanWriter {
+        ChanWriter { chan: self.chan.clone() }
+    }
+}
+
 impl Writer for ChanWriter {
     fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         if !self.chan.try_send(buf.to_owned()) {