Adds a bunch of `bytes` as separate console writes to the expected output.
(mut self, bytes: &'static str)
| 567 | |
| 568 | /// Adds a bunch of `bytes` as separate console writes to the expected output. |
| 569 | fn add_output_bytes(mut self, bytes: &'static str) -> Self { |
| 570 | if bytes.is_empty() { |
| 571 | self.exp_output.push(CapturedOut::Write("".to_string())) |
| 572 | } else { |
| 573 | for b in bytes.chars() { |
| 574 | let mut buf = [0u8; 4]; |
| 575 | self.exp_output.push(CapturedOut::Write(b.encode_utf8(&mut buf).to_string())); |
| 576 | } |
| 577 | } |
| 578 | self |
| 579 | } |
| 580 | |
| 581 | /// Sets the size of the console. |
| 582 | fn set_size_chars(mut self, size: CharsXY) -> Self { |