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

Merge pull request #3327 from cakebaker/ticket_3324

df: --output w/o "=" doesn't expect further args
This commit is contained in:
Sylvestre Ledru 2022-03-28 18:51:06 +02:00 committed by GitHub
commit d6fd701511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -388,6 +388,8 @@ pub fn uu_app<'a>() -> Command<'a> {
Arg::new(OPT_OUTPUT)
.long("output")
.takes_value(true)
.min_values(0)
.require_equals(true)
.use_value_delimiter(true)
.multiple_occurrences(true)
.possible_values(OUTPUT_FIELD_LIST)

View file

@ -80,6 +80,11 @@ fn test_output_option() {
new_ucmd!().arg("--output=invalid_option").fails();
}
#[test]
fn test_output_option_without_equals_sign() {
new_ucmd!().arg("--output").arg(".").succeeds();
}
#[test]
fn test_type_option() {
new_ucmd!().args(&["-t", "ext4", "-t", "ext3"]).succeeds();