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

cat: bugfix when running with -T option

Fixes an crash seen when running with -T option if no newline
is found in a buffer.
Added unit test to validate.
This commit is contained in:
Karl McDowall 2025-04-02 16:56:38 -06:00
parent 3a0b43bdf7
commit a4b621ad8a
2 changed files with 24 additions and 1 deletions

View file

@ -414,6 +414,15 @@ fn test_stdin_nonprinting_and_tabs_repeated() {
.stdout_only("^I^@\n");
}
#[test]
fn test_stdin_tabs_no_newline() {
new_ucmd!()
.args(&["-T"])
.pipe_in("\ta")
.succeeds()
.stdout_only("^Ia");
}
#[test]
fn test_stdin_squeeze_blank() {
for same_param in ["-s", "--squeeze-blank", "--squeeze"] {