Test new line

This commit is contained in:
Son 2020-02-09 13:26:51 +11:00
parent 29729818f0
commit 76ff2f5480

View file

@ -472,11 +472,11 @@ mod tests {
use std::io::{BufWriter, stdout}; use std::io::{BufWriter, stdout};
#[test] #[test]
fn test_write_nonprint_to_end() { fn test_write_nonprint_to_end_new_line() {
let mut writer = BufWriter::with_capacity(1024 * 64, stdout()); let mut writer = BufWriter::with_capacity(1024 * 64, stdout());
let in_buf = [b'\n']; let in_buf = [b'\n'];
let tab: [u8; 0] = []; let tab: [u8; 0] = [];
super::write_nonprint_to_end(&in_buf, &mut writer, &tab); super::write_nonprint_to_end(&in_buf, &mut writer, &tab);
assert_eq!(tab.len(), 0); assert_eq!(writer.buffer().len(), 0);
} }
} }