mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
comm: implement and test correct handling of repeated flags
This commit is contained in:
@@ -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!()
|
||||
|
||||
Reference in New Issue
Block a user