mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
basename: test flag implications, document -z correctly
This commit is contained in:
parent
d7a09c042a
commit
9441806a23
2 changed files with 17 additions and 1 deletions
|
@ -201,3 +201,19 @@ fn test_simple_format() {
|
|||
fn test_invalid_arg() {
|
||||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_zero_does_not_imply_multiple() {
|
||||
new_ucmd!()
|
||||
.args(&["-z", "foo.c", "c"])
|
||||
.succeeds()
|
||||
.stdout_is("foo.\0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_suffix_implies_multiple() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", ".c", "foo.c", "o.c"])
|
||||
.succeeds()
|
||||
.stdout_is("foo\no\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue