Skip to content

Commit

Permalink
Fix the capture_stderr test
Browse files Browse the repository at this point in the history
There's always a fun time having two sets of standard libraries when testing!
  • Loading branch information
alexcrichton authored and aturon committed Dec 19, 2014
1 parent ced2239 commit 9644d60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libstd/io/stdio.rs
Expand Up @@ -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();
Expand Down

0 comments on commit 9644d60

Please sign in to comment.