mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
comm: implement and test correct handling of repeated flags
This commit is contained in:
parent
801edbbcb4
commit
884ef1f54b
2 changed files with 9 additions and 0 deletions
|
@ -178,6 +178,7 @@ pub fn uu_app() -> Command {
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.override_usage(format_usage(USAGE))
|
.override_usage(format_usage(USAGE))
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
|
.args_override_self(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::COLUMN_1)
|
Arg::new(options::COLUMN_1)
|
||||||
.short('1')
|
.short('1')
|
||||||
|
|
|
@ -75,6 +75,14 @@ fn total_with_suppressed_regular_output() {
|
||||||
.stdout_is_fixture("ab_total_suppressed_regular_output.expected");
|
.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]
|
#[test]
|
||||||
fn total_with_output_delimiter() {
|
fn total_with_output_delimiter() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue