1
Fork 0
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:
jaggededgedjustice 2021-01-05 08:10:01 +00:00 committed by GitHub
parent 61577e34fa
commit 18c39daed7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 8 deletions

View file

@ -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");
}