1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

Merge pull request #2023 from ycd/cut

cut: move to clap, add gnu like error messages + tests
This commit is contained in:
Sylvestre Ledru 2021-04-04 14:47:15 +02:00 committed by GitHub
commit c196f4ae8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 169 additions and 34 deletions

View file

@ -139,3 +139,21 @@ fn test_zero_terminated_only_delimited() {
.succeeds()
.stdout_only("82\n7\0");
}
#[test]
fn test_directory_and_no_such_file() {
let (at, mut ucmd) = at_and_ucmd!();
at.mkdir("some");
ucmd.arg("-b1")
.arg("some")
.run()
.stderr_is("cut: error: some: Is a directory\n");
new_ucmd!()
.arg("-b1")
.arg("some")
.run()
.stderr_is("cut: error: some: No such file or directory\n");
}