Rollup merge of #22836 - mahkoh:testflush, r=huonw
See 41f8b1e89b/src/libtest/lib.rs (L783-L788)
This commit is contained in:
commit
204adc9ab8
1 changed files with 13 additions and 4 deletions
|
@ -506,16 +506,25 @@ impl<T: Writer> ConsoleTestState<T> {
|
|||
if self.use_color {
|
||||
try!(term.reset());
|
||||
}
|
||||
Ok(())
|
||||
term.flush()
|
||||
}
|
||||
Raw(ref mut stdout) => {
|
||||
try!(stdout.write_all(word.as_bytes()));
|
||||
stdout.flush()
|
||||
}
|
||||
Raw(ref mut stdout) => stdout.write_all(word.as_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn write_plain(&mut self, s: &str) -> old_io::IoResult<()> {
|
||||
match self.out {
|
||||
Pretty(ref mut term) => term.write_all(s.as_bytes()),
|
||||
Raw(ref mut stdout) => stdout.write_all(s.as_bytes())
|
||||
Pretty(ref mut term) => {
|
||||
try!(term.write_all(s.as_bytes()));
|
||||
term.flush()
|
||||
},
|
||||
Raw(ref mut stdout) => {
|
||||
try!(stdout.write_all(s.as_bytes()));
|
||||
stdout.flush()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue