adjust tests for pty -> Write changes

This commit is contained in:
Wez Furlong committed 2019-03-02 12:29:17 -08:00
1 parent ec2c270a38
commit e773cff24e
1 file changed
+11 -1
+11 -1
View File
@@ -20,6 +20,16 @@ impl TestHost {
Self::default()
}
}
impl std::io::Write for TestHost {
fn write(&mut self, _buf: &[u8]) -> Result<usize, std::io::Error> {
panic!("no writer support in TestHost");
}
fn flush(&mut self) -> Result<(), std::io::Error> {
panic!("no writer support in TestHost");
}
}
impl TerminalHost for TestHost {
fn set_title(&mut self, title: &str) {
self.title = title.into();
@@ -38,7 +48,7 @@ impl TerminalHost for TestHost {
}
fn writer(&mut self) -> &mut std::io::Write {
panic!("no writer support in TestHost");
self
}
fn click_link(&mut self, _link: &Rc<Hyperlink>) {}