Fix the capture_stderr test
There's always a fun time having two sets of standard libraries when testing!
This commit is contained in:
parent
ced2239852
commit
9644d60cc4
1 changed files with 3 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue