test: update for term fallout

This commit is contained in:
Corey Richardson
2014-04-08 12:18:16 -04:00
parent 7bf1de5283
commit 3af7755909

View File

@@ -447,7 +447,7 @@ pub enum TestResult {
} }
enum OutputLocation<T> { enum OutputLocation<T> {
Pretty(term::Terminal<T>), Pretty(~term::Terminal<~Writer:Send>:Send),
Raw(T), Raw(T),
} }
@@ -472,10 +472,11 @@ impl<T: Writer> ConsoleTestState<T> {
Some(ref path) => Some(try!(File::create(path))), Some(ref path) => Some(try!(File::create(path))),
None => None None => None
}; };
let out = match term::Terminal::new(io::stdio::stdout_raw()) { let out = match term::stdout() {
Err(_) => Raw(io::stdio::stdout_raw()), None => Raw(io::stdio::stdout_raw()),
Ok(t) => Pretty(t) Some(t) => Pretty(t)
}; };
Ok(ConsoleTestState { Ok(ConsoleTestState {
out: out, out: out,
log_out: log_out, log_out: log_out,