mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tail: rm trailing \n if input doesn't end with one
Fix a bug where `tail` would inappropriately add a newline to the last line of output even though the input did not end with one.
This commit is contained in:
parent
13de6cabfc
commit
ca812a7558
3 changed files with 92 additions and 2 deletions
|
@ -484,3 +484,8 @@ fn test_no_such_file() {
|
|||
.no_stdout()
|
||||
.stderr_contains("cannot open 'bogusfile' for reading: No such file or directory");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_no_trailing_newline() {
|
||||
new_ucmd!().pipe_in("x").succeeds().stdout_only("x");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue