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:
parent
3a0b43bdf7
commit
a4b621ad8a
2 changed files with 24 additions and 1 deletions
|
@ -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"] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue