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

tac: handle no line separators in file

Change the behavior of `tac` when there are no line separators in the
input. Previously, it was appending an extra line separator; this commit
prevents that from happening. The input is now writted directly to
stdout.
This commit is contained in:
Jeffrey Finkelstein 2021-07-25 15:19:29 -04:00
parent c98e7f5de9
commit 2648f330e4
2 changed files with 13 additions and 1 deletions

View file

@ -68,3 +68,8 @@ fn test_invalid_input() {
.fails()
.stderr_contains("dir: read error: Invalid argument");
}
#[test]
fn test_no_line_separators() {
new_ucmd!().pipe_in("a").succeeds().stdout_is("a");
}