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

cat: handle CRLF delimiters correctly (#6763)

* fix issue #6248

* add test to cat for the case of issue #6248
This commit is contained in:
Peng Zijun 2024-10-02 21:15:06 +08:00 committed by GitHub
parent e0e3ea6996
commit 382e787d1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 2 deletions

View file

@ -288,6 +288,15 @@ fn test_numbered_lines_no_trailing_newline() {
// spell-checker:enable
}
#[test]
fn test_numbered_lines_with_crlf() {
new_ucmd!()
.args(&["-n"])
.pipe_in("Hello\r\nWorld")
.succeeds()
.stdout_only(" 1\tHello\r\n 2\tWorld");
}
#[test]
fn test_stdin_show_nonprinting() {
for same_param in ["-v", "-vv", "--show-nonprinting", "--show-non"] {