mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fold: Handle input with newlines (#1680)
The read_line function appends to the given buffer which is never cleared. This leads to lines being duplicated.
This commit is contained in:
parent
61577e34fa
commit
18c39daed7
4 changed files with 25 additions and 8 deletions
|
@ -23,3 +23,11 @@ fn test_40_column_word_boundary() {
|
|||
.run()
|
||||
.stdout_is_fixture("lorem_ipsum_40_column_word.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_default_warp_with_newlines() {
|
||||
new_ucmd!()
|
||||
.arg("lorem_ipsum_new_line.txt")
|
||||
.run()
|
||||
.stdout_is_fixture("lorem_ipsum_new_line_80_column.expected");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue