1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 19:56:17 +00:00

Merge pull request #2982 from Dr-Emann/paste_cleanup

paste: Fixes and cleanup
This commit is contained in:
Sylvestre Ledru 2022-02-12 19:00:39 +01:00 committed by GitHub
commit 142c24e579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 20 deletions

View file

@ -60,6 +60,24 @@ static EXAMPLE_DATA: &[TestData] = &[
ins: &["1\na\n", "2\nb\n"],
out: "1 2\na b\n",
},
TestData {
name: "multibyte-delim",
args: &["-d", "💣"],
ins: &["1\na\n", "2\nb\n"],
out: "1💣2\na💣b\n",
},
TestData {
name: "multibyte-delim-serial",
args: &["-d", "💣", "-s"],
ins: &["1\na\n", "2\nb\n"],
out: "1💣a\n2💣b\n",
},
TestData {
name: "trailing whitespace",
args: &["-d", "|"],
ins: &["1 \na \n", "2\t\nb\t\n"],
out: "1 |2\t\na |b\t\n",
},
];
#[test]