From ee2a888860ea496b5a972ed35fb742b4ae008233 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 12 Feb 2014 10:25:09 -0800 Subject: 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. --- src/libstd/io/comm_adapters.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libstd') 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()) { -- cgit 1.4.1-3-g733a5