Fix the capture_stderr test

There's always a fun time having two sets of standard libraries when testing!
This commit is contained in:
Alex Crichton 2014-12-10 07:36:33 -08:00 committed by Aaron Turon
parent ced2239852
commit 9644d60cc4

View file

@ -532,15 +532,14 @@ mod tests {
assert_eq!(r.read_to_string().unwrap(), "hello!\n");
}
//#[test]
#[test]
fn capture_stderr() {
use realstd::comm::channel;
use realstd::io::{ChanReader, ChanWriter, Reader};
use io::{ChanReader, ChanWriter, Reader};
let (tx, rx) = channel();
let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx));
spawn(move|| {
::realstd::io::stdio::set_stderr(box w);
set_stderr(box w);
panic!("my special message");
});
let s = r.read_to_string().unwrap();