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
2 changed files with 7 additions and 0 deletions
+2
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)
+5
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();