mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Test write tab
This commit is contained in:
parent
76ff2f5480
commit
7c9cc92163
1 changed files with 10 additions and 1 deletions
|
@ -474,9 +474,18 @@ mod tests {
|
|||
#[test]
|
||||
fn test_write_nonprint_to_end_new_line() {
|
||||
let mut writer = BufWriter::with_capacity(1024 * 64, stdout());
|
||||
let in_buf = [b'\n'];
|
||||
let in_buf = *b"\n";
|
||||
let tab: [u8; 0] = [];
|
||||
super::write_nonprint_to_end(&in_buf, &mut writer, &tab);
|
||||
assert_eq!(writer.buffer().len(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_write_nonprint_to_end_9() {
|
||||
let mut writer = BufWriter::with_capacity(1024 * 64, stdout());
|
||||
let in_buf = [9u8];
|
||||
let tab = b"tab";
|
||||
super::write_nonprint_to_end(&in_buf, &mut writer, tab);
|
||||
assert_eq!(writer.buffer(), tab);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue