1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #2957 from jfinkels/head-preserve-no-final-newline

head: don't add trailing newline to end of file that didn't originally have one
This commit is contained in:
Sylvestre Ledru 2022-02-12 19:03:13 +01:00 committed by GitHub
commit 0ed5e2c884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 91 deletions

View file

@ -157,11 +157,17 @@ fn test_negative_byte_syntax() {
#[test]
fn test_negative_zero_lines() {
new_ucmd!()
.args(&["--lines=-0"])
.arg("--lines=-0")
.pipe_in("a\nb\n")
.succeeds()
.stdout_is("a\nb\n");
new_ucmd!()
.arg("--lines=-0")
.pipe_in("a\nb")
.succeeds()
.stdout_is("a\nb");
}
#[test]
fn test_negative_zero_bytes() {
new_ucmd!()