mirror of
https://github.com/uutils/coreutils
synced 2024-07-23 19:04:18 +00:00
comm: implement and test correct handling of repeated flags
This commit is contained in:
parent
801edbbcb4
commit
884ef1f54b
|
@ -178,6 +178,7 @@ pub fn uu_app() -> Command {
|
|||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
.args_override_self(true)
|
||||
.arg(
|
||||
Arg::new(options::COLUMN_1)
|
||||
.short('1')
|
||||
|
|
|
@ -75,6 +75,14 @@ fn total_with_suppressed_regular_output() {
|
|||
.stdout_is_fixture("ab_total_suppressed_regular_output.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn repeated_flags() {
|
||||
new_ucmd!()
|
||||
.args(&["--total", "-123123", "--total", "a", "b"])
|
||||
.succeeds()
|
||||
.stdout_is_fixture("ab_total_suppressed_regular_output.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn total_with_output_delimiter() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Reference in a new issue