From 68a7740fdc8f83f6ab3cf6d63e60722f28fb7906 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 3 Jan 2023 13:22:35 -0600 Subject: [PATCH] fix(error): Match rustc for giving more information --- examples/derive_ref/interop_tests.md | 12 ++++----- examples/escaped-positional-derive.md | 2 +- examples/escaped-positional.md | 2 +- examples/pacman.md | 2 +- examples/tutorial_builder/03_01_flag_bool.md | 2 +- examples/tutorial_builder/04_01_enum.md | 2 +- examples/tutorial_builder/04_01_possible.md | 2 +- examples/tutorial_builder/04_02_parse.md | 4 +-- examples/tutorial_builder/04_02_validate.md | 4 +-- examples/tutorial_builder/04_03_relations.md | 6 ++--- examples/tutorial_builder/04_04_custom.md | 6 ++--- examples/tutorial_derive/03_01_flag_bool.md | 2 +- examples/tutorial_derive/04_01_enum.md | 2 +- examples/tutorial_derive/04_02_parse.md | 4 +-- examples/tutorial_derive/04_02_validate.md | 4 +-- examples/tutorial_derive/04_03_relations.md | 6 ++--- examples/tutorial_derive/04_04_custom.md | 6 ++--- examples/typed-derive.md | 18 +++++++------- src/error/format.rs | 4 +-- tests/builder/app_settings.rs | 2 +- tests/builder/conflicts.rs | 14 +++++------ tests/builder/default_vals.rs | 2 +- tests/builder/double_require.rs | 4 +-- tests/builder/empty_values.rs | 2 +- tests/builder/error.rs | 10 ++++---- tests/builder/flags.rs | 6 ++--- tests/builder/groups.rs | 10 ++++---- tests/builder/help.rs | 2 +- tests/builder/opts.rs | 6 ++--- tests/builder/possible_values.rs | 18 +++++++------- tests/builder/require.rs | 26 ++++++++++---------- tests/builder/subcommands.rs | 16 ++++++------ tests/derive/groups.rs | 2 +- tests/derive/help.rs | 2 +- tests/ui/error_stderr.toml | 2 +- 35 files changed, 107 insertions(+), 107 deletions(-) diff --git a/examples/derive_ref/interop_tests.md b/examples/derive_ref/interop_tests.md index 961f2167..ceff9c83 100644 --- a/examples/derive_ref/interop_tests.md +++ b/examples/derive_ref/interop_tests.md @@ -39,7 +39,7 @@ error: found argument '--unknown' which wasn't expected, or isn't valid in this Usage: interop_augment_args[EXE] [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` @@ -74,7 +74,7 @@ error: found argument '--unknown' which wasn't expected, or isn't valid in this Usage: interop_augment_subcommands[EXE] derived [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` @@ -85,7 +85,7 @@ error: the subcommand 'unknown' wasn't recognized Usage: interop_augment_subcommands[EXE] [COMMAND] -For more information try '--help' +For more information, try '--help'. ``` @@ -146,7 +146,7 @@ error: found argument '--unknown' which wasn't expected, or isn't valid in this Usage: interop_hand_subcommand[EXE] add [NAME]... -For more information try '--help' +For more information, try '--help'. ``` @@ -189,7 +189,7 @@ error: the subcommand 'unknown' wasn't recognized Usage: interop_hand_subcommand[EXE] [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` @@ -243,6 +243,6 @@ error: found argument '--unknown' which wasn't expected, or isn't valid in this Usage: interop_flatten_hand_args[EXE] [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/escaped-positional-derive.md b/examples/escaped-positional-derive.md index 3b7dc6a1..adc0ca32 100644 --- a/examples/escaped-positional-derive.md +++ b/examples/escaped-positional-derive.md @@ -37,7 +37,7 @@ error: found argument 'foo' which wasn't expected, or isn't valid in this contex Usage: escaped-positional-derive[EXE] [OPTIONS] [-- ...] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/escaped-positional.md b/examples/escaped-positional.md index fff558a4..31ddd3fc 100644 --- a/examples/escaped-positional.md +++ b/examples/escaped-positional.md @@ -37,7 +37,7 @@ error: found argument 'foo' which wasn't expected, or isn't valid in this contex Usage: escaped-positional[EXE] [OPTIONS] [-- ...] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/pacman.md b/examples/pacman.md index d700e694..b02cf8f1 100644 --- a/examples/pacman.md +++ b/examples/pacman.md @@ -71,7 +71,7 @@ error: the argument '--search ...' cannot be used with '--info' Usage: pacman[EXE] {sync|--sync|-S} --search ... ... -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/03_01_flag_bool.md b/examples/tutorial_builder/03_01_flag_bool.md index c666f6cf..11aeaf3f 100644 --- a/examples/tutorial_builder/03_01_flag_bool.md +++ b/examples/tutorial_builder/03_01_flag_bool.md @@ -21,6 +21,6 @@ error: the argument '--verbose' was provided more than once, but cannot be used Usage: 03_01_flag_bool[EXE] [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/04_01_enum.md b/examples/tutorial_builder/04_01_enum.md index d8c49be5..04ab07d5 100644 --- a/examples/tutorial_builder/04_01_enum.md +++ b/examples/tutorial_builder/04_01_enum.md @@ -42,6 +42,6 @@ $ 04_01_enum medium error: 'medium' isn't a valid value for '' [possible values: fast, slow] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/04_01_possible.md b/examples/tutorial_builder/04_01_possible.md index 1db20d81..5be0c822 100644 --- a/examples/tutorial_builder/04_01_possible.md +++ b/examples/tutorial_builder/04_01_possible.md @@ -22,6 +22,6 @@ $ 04_01_possible medium error: 'medium' isn't a valid value for '' [possible values: fast, slow] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/04_02_parse.md b/examples/tutorial_builder/04_02_parse.md index a9a8d8c8..af03e95c 100644 --- a/examples/tutorial_builder/04_02_parse.md +++ b/examples/tutorial_builder/04_02_parse.md @@ -18,12 +18,12 @@ $ 04_02_parse foobar ? failed error: invalid value 'foobar' for '': invalid digit found in string -For more information try '--help' +For more information, try '--help'. $ 04_02_parse_derive 0 ? failed error: invalid value '0' for '': 0 is not in 1..=65535 -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/04_02_validate.md b/examples/tutorial_builder/04_02_validate.md index 9096933b..949072be 100644 --- a/examples/tutorial_builder/04_02_validate.md +++ b/examples/tutorial_builder/04_02_validate.md @@ -18,12 +18,12 @@ $ 04_02_validate foobar ? failed error: invalid value 'foobar' for '': `foobar` isn't a port number -For more information try '--help' +For more information, try '--help'. $ 04_02_validate 0 ? failed error: invalid value '0' for '': port not in range 1-65535 -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_builder/04_03_relations.md b/examples/tutorial_builder/04_03_relations.md index 304d392a..dd0c35a6 100644 --- a/examples/tutorial_builder/04_03_relations.md +++ b/examples/tutorial_builder/04_03_relations.md @@ -24,7 +24,7 @@ error: the following required arguments were not provided: Usage: 04_03_relations[EXE] <--set-ver |--major|--minor|--patch> [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_03_relations --major Version: 2.2.3 @@ -35,7 +35,7 @@ error: the argument '--major' cannot be used with '--minor' Usage: 04_03_relations[EXE] <--set-ver |--major|--minor|--patch> [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_03_relations --major -c config.toml ? failed @@ -44,7 +44,7 @@ error: the following required arguments were not provided: Usage: 04_03_relations[EXE] -c <--set-ver |--major|--minor|--patch> > -For more information try '--help' +For more information, try '--help'. $ 04_03_relations --major -c config.toml --spec-in input.txt Version: 2.2.3 diff --git a/examples/tutorial_builder/04_04_custom.md b/examples/tutorial_builder/04_04_custom.md index 357958bb..0a83eb9b 100644 --- a/examples/tutorial_builder/04_04_custom.md +++ b/examples/tutorial_builder/04_04_custom.md @@ -23,7 +23,7 @@ error: Can only modify one version field Usage: 04_04_custom[EXE] [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom --major Version: 2.2.3 @@ -34,7 +34,7 @@ error: Can only modify one version field Usage: 04_04_custom[EXE] [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom --major -c config.toml ? failed @@ -43,7 +43,7 @@ error: INPUT_FILE or --spec-in is required when using --config Usage: 04_04_custom[EXE] [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom --major -c config.toml --spec-in input.txt Version: 2.2.3 diff --git a/examples/tutorial_derive/03_01_flag_bool.md b/examples/tutorial_derive/03_01_flag_bool.md index cd8d7bde..86eb07d6 100644 --- a/examples/tutorial_derive/03_01_flag_bool.md +++ b/examples/tutorial_derive/03_01_flag_bool.md @@ -21,6 +21,6 @@ error: the argument '--verbose' was provided more than once, but cannot be used Usage: 03_01_flag_bool_derive[EXE] [OPTIONS] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_derive/04_01_enum.md b/examples/tutorial_derive/04_01_enum.md index b09aa49e..ea580d62 100644 --- a/examples/tutorial_derive/04_01_enum.md +++ b/examples/tutorial_derive/04_01_enum.md @@ -42,6 +42,6 @@ $ 04_01_enum_derive medium error: 'medium' isn't a valid value for '' [possible values: fast, slow] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_derive/04_02_parse.md b/examples/tutorial_derive/04_02_parse.md index 7915dedf..573b43cc 100644 --- a/examples/tutorial_derive/04_02_parse.md +++ b/examples/tutorial_derive/04_02_parse.md @@ -18,12 +18,12 @@ $ 04_02_parse_derive foobar ? failed error: invalid value 'foobar' for '': invalid digit found in string -For more information try '--help' +For more information, try '--help'. $ 04_02_parse_derive 0 ? failed error: invalid value '0' for '': 0 is not in 1..=65535 -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_derive/04_02_validate.md b/examples/tutorial_derive/04_02_validate.md index 21480d3e..f8835fdc 100644 --- a/examples/tutorial_derive/04_02_validate.md +++ b/examples/tutorial_derive/04_02_validate.md @@ -18,12 +18,12 @@ $ 04_02_validate_derive foobar ? failed error: invalid value 'foobar' for '': `foobar` isn't a port number -For more information try '--help' +For more information, try '--help'. $ 04_02_validate_derive 0 ? failed error: invalid value '0' for '': port not in range 1-65535 -For more information try '--help' +For more information, try '--help'. ``` diff --git a/examples/tutorial_derive/04_03_relations.md b/examples/tutorial_derive/04_03_relations.md index 09fbdbff..6eafb9fb 100644 --- a/examples/tutorial_derive/04_03_relations.md +++ b/examples/tutorial_derive/04_03_relations.md @@ -24,7 +24,7 @@ error: the following required arguments were not provided: Usage: 04_03_relations_derive[EXE] <--set-ver |--major|--minor|--patch> [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_03_relations_derive --major Version: 2.2.3 @@ -35,7 +35,7 @@ error: the argument '--major' cannot be used with '--minor' Usage: 04_03_relations_derive[EXE] <--set-ver |--major|--minor|--patch> [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_03_relations_derive --major -c config.toml ? failed @@ -44,7 +44,7 @@ error: the following required arguments were not provided: Usage: 04_03_relations_derive[EXE] -c <--set-ver |--major|--minor|--patch> > -For more information try '--help' +For more information, try '--help'. $ 04_03_relations_derive --major -c config.toml --spec-in input.txt Version: 2.2.3 diff --git a/examples/tutorial_derive/04_04_custom.md b/examples/tutorial_derive/04_04_custom.md index 1b1469ef..c601e9fb 100644 --- a/examples/tutorial_derive/04_04_custom.md +++ b/examples/tutorial_derive/04_04_custom.md @@ -23,7 +23,7 @@ error: Can only modify one version field Usage: clap [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom_derive --major Version: 2.2.3 @@ -34,7 +34,7 @@ error: Can only modify one version field Usage: clap [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom_derive --major -c config.toml ? failed @@ -43,7 +43,7 @@ error: INPUT_FILE or --spec-in is required when using --config Usage: clap [OPTIONS] [INPUT_FILE] -For more information try '--help' +For more information, try '--help'. $ 04_04_custom_derive --major -c config.toml --spec-in input.txt Version: 2.2.3 diff --git a/examples/typed-derive.md b/examples/typed-derive.md index 047beb9c..6d4819e4 100644 --- a/examples/typed-derive.md +++ b/examples/typed-derive.md @@ -26,7 +26,7 @@ $ typed-derive -O plaid ? failed error: invalid value 'plaid' for '-O ': invalid digit found in string -For more information try '--help' +For more information, try '--help'. ``` @@ -46,7 +46,7 @@ $ typed-derive --bind localhost ? failed error: invalid value 'localhost' for '--bind ': invalid IP address syntax -For more information try '--help' +For more information, try '--help'. ``` @@ -59,7 +59,7 @@ $ typed-derive --sleep forever ? failed error: invalid value 'forever' for '--sleep ': expected number at 0 -For more information try '--help' +For more information, try '--help'. ``` @@ -72,13 +72,13 @@ $ typed-derive -D Foo ? failed error: invalid value 'Foo' for '-D ': invalid KEY=value: no `=` found in `Foo` -For more information try '--help' +For more information, try '--help'. $ typed-derive -D Foo=Bar ? failed error: invalid value 'Foo=Bar' for '-D ': invalid digit found in string -For more information try '--help' +For more information, try '--help'. ``` @@ -95,14 +95,14 @@ $ typed-derive --port error: the argument '--port ' requires a value but none was supplied [possible values: 22, 80] -For more information try '--help' +For more information, try '--help'. $ typed-derive --port 3000 ? failed error: '3000' isn't a valid value for '--port ' [possible values: 22, 80] -For more information try '--help' +For more information, try '--help'. ``` @@ -119,13 +119,13 @@ $ typed-derive --log-level error: the argument '--log-level ' requires a value but none was supplied [possible values: info, debug, info, warn, error] -For more information try '--help' +For more information, try '--help'. $ typed-derive --log-level critical ? failed error: 'critical' isn't a valid value for '--log-level ' [possible values: info, debug, info, warn, error] -For more information try '--help' +For more information, try '--help'. ``` diff --git a/src/error/format.rs b/src/error/format.rs index fa021f39..9efc2eb0 100644 --- a/src/error/format.rs +++ b/src/error/format.rs @@ -417,9 +417,9 @@ pub(crate) fn get_help_flag(cmd: &Command) -> Option<&'static str> { fn try_help(styled: &mut StyledStr, help: Option<&str>) { if let Some(help) = help { - styled.none("\n\nFor more information try '"); + styled.none("\n\nFor more information, try '"); styled.literal(help.to_owned()); - styled.none("'\n"); + styled.none("'.\n"); } else { styled.none("\n"); } diff --git a/tests/builder/app_settings.rs b/tests/builder/app_settings.rs index 3e44cfc5..f1342bc8 100644 --- a/tests/builder/app_settings.rs +++ b/tests/builder/app_settings.rs @@ -67,7 +67,7 @@ error: 'sc_required' requires a subcommand but one was not provided Usage: sc_required -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("sc_required") diff --git a/tests/builder/conflicts.rs b/tests/builder/conflicts.rs index c14f6ea5..284d807c 100644 --- a/tests/builder/conflicts.rs +++ b/tests/builder/conflicts.rs @@ -325,7 +325,7 @@ error: the argument '--flag...' cannot be used with '-F' Usage: clap-test --flag... --long-option-2 [positional3]... -For more information try '--help' +For more information, try '--help'. "; utils::assert_output( @@ -344,7 +344,7 @@ error: the argument '-F' cannot be used with '--flag...' Usage: clap-test -F --long-option-2 [positional3]... -For more information try '--help' +For more information, try '--help'. "; utils::assert_output( @@ -363,7 +363,7 @@ error: the argument '-F' was provided more than once, but cannot be used multipl Usage: clap-test [OPTIONS] [positional] [positional2] [positional3]... [COMMAND] -For more information try '--help' +For more information, try '--help'. "; utils::assert_output(utils::complex_app(), "clap-test -F -F", ERR, true); @@ -377,7 +377,7 @@ error: the argument '--flag...' cannot be used with '-F' Usage: clap-test --flag... --long-option-2 [positional3]... -For more information try '--help' +For more information, try '--help'. "; utils::assert_output( @@ -396,7 +396,7 @@ error: the argument '-F' cannot be used with '--flag...' Usage: clap-test -F --long-option-2 [positional3]... -For more information try '--help' +For more information, try '--help'. "; utils::assert_output( @@ -417,7 +417,7 @@ error: the argument '--one' cannot be used with: Usage: three_conflicting_arguments --one -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("three_conflicting_arguments") @@ -739,7 +739,7 @@ error: found argument 'sub1' which wasn't expected, or isn't valid in this conte Usage: test [OPTIONS] test -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("test") diff --git a/tests/builder/default_vals.rs b/tests/builder/default_vals.rs index 51f2835e..f08906d2 100644 --- a/tests/builder/default_vals.rs +++ b/tests/builder/default_vals.rs @@ -735,7 +735,7 @@ error: the following required arguments were not provided: Usage: bug -For more information try '--help' +For more information, try '--help'. ", true, ); diff --git a/tests/builder/double_require.rs b/tests/builder/double_require.rs index 14a0c203..11e0e45c 100644 --- a/tests/builder/double_require.rs +++ b/tests/builder/double_require.rs @@ -64,7 +64,7 @@ error: the following required arguments were not provided: Usage: prog -b -c -For more information try '--help' +For more information, try '--help'. "; let res = cmd().try_get_matches_from(vec!["", "-b"]); @@ -79,7 +79,7 @@ error: the following required arguments were not provided: Usage: prog -c -b -For more information try '--help' +For more information, try '--help'. "; let res = cmd().try_get_matches_from(vec!["", "-c"]); diff --git a/tests/builder/empty_values.rs b/tests/builder/empty_values.rs index f31788d4..07882550 100644 --- a/tests/builder/empty_values.rs +++ b/tests/builder/empty_values.rs @@ -122,7 +122,7 @@ fn no_empty_values_without_equals_but_requires_equals() { Usage: config [OPTIONS] -For more information try '--help' +For more information, try '--help'. "; utils::assert_output(cmd, "config --config", NO_EUQALS_ERROR, true); diff --git a/tests/builder/error.rs b/tests/builder/error.rs index b382bc20..7c2033fa 100644 --- a/tests/builder/error.rs +++ b/tests/builder/error.rs @@ -27,7 +27,7 @@ fn app_error() { Usage: test [OPTIONS] --all -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("test") .arg( @@ -124,7 +124,7 @@ error: found argument 'unused' which wasn't expected, or isn't valid in this con Usage: test -For more information try '--help' +For more information, try '--help'. "; assert_error(err, expected_kind, MESSAGE, true); } @@ -145,7 +145,7 @@ error: found argument '--foo' which wasn't expected, or isn't valid in this cont Usage: rg [PATTERN] -For more information try '--help' +For more information, try '--help'. "; assert_error(err, expected_kind, MESSAGE, true); } @@ -164,7 +164,7 @@ error: found argument '--foo' which wasn't expected, or isn't valid in this cont Usage: rg [PATTERN] -For more information try '--help' +For more information, try '--help'. "; assert_error(err, expected_kind, MESSAGE, true); } @@ -183,7 +183,7 @@ error: found argument '--foo' which wasn't expected, or isn't valid in this cont Usage: test -For more information try '--help' +For more information, try '--help'. "; assert_error(err, expected_kind, MESSAGE, true); } diff --git a/tests/builder/flags.rs b/tests/builder/flags.rs index fde1c3a8..8eee4ea3 100644 --- a/tests/builder/flags.rs +++ b/tests/builder/flags.rs @@ -144,7 +144,7 @@ error: the value 'foo' was provided to '--a-flag' but it wasn't expecting any mo Usage: mycat --a-flag [filename] -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("mycat") @@ -164,7 +164,7 @@ error: found argument '--another-flag' which wasn't expected, or isn't valid in Usage: mycat [OPTIONS] [filename] -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("mycat") @@ -208,7 +208,7 @@ error: found argument '-----' which wasn't expected, or isn't valid in this cont Usage: test -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("test").arg(Arg::new("arg").action(ArgAction::Set).required(true)); diff --git a/tests/builder/groups.rs b/tests/builder/groups.rs index 61fd1f7d..f9d4928b 100644 --- a/tests/builder/groups.rs +++ b/tests/builder/groups.rs @@ -136,7 +136,7 @@ fn req_group_usage_string() { Usage: clap-test -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("req_group") @@ -161,7 +161,7 @@ error: the argument '--delete' cannot be used with '[base]' Usage: clap-test -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("req_group") @@ -191,7 +191,7 @@ error: the argument '--delete' cannot be used with '--all' Usage: clap-test <--all|--delete> -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("req_group") @@ -309,7 +309,7 @@ error: the argument '--major' cannot be used with '--minor' Usage: prog --major -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("prog") @@ -329,7 +329,7 @@ error: the following required arguments were not provided: Usage: prog --config <--in|--spec> -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("prog") diff --git a/tests/builder/help.rs b/tests/builder/help.rs index 6ee67b0d..b6776bb2 100644 --- a/tests/builder/help.rs +++ b/tests/builder/help.rs @@ -83,7 +83,7 @@ fn help_multi_subcommand_error() { Usage: ctest subcmd multi [OPTIONS] -For more information try '--help' +For more information, try '--help'. "; utils::assert_eq(EXPECTED, err.to_string()); } diff --git a/tests/builder/opts.rs b/tests/builder/opts.rs index 4fa3ee5b..3a116576 100644 --- a/tests/builder/opts.rs +++ b/tests/builder/opts.rs @@ -25,7 +25,7 @@ fn require_equals_fail_message() { Usage: prog [OPTIONS] -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("prog").arg( Arg::new("cfg") @@ -452,7 +452,7 @@ error: found argument '--optio' which wasn't expected, or isn't valid in this co Usage: clap-test --option ... [positional] [positional2] [positional3]... -For more information try '--help' +For more information, try '--help'. "; utils::assert_output(utils::complex_app(), "clap-test --optio=foo", DYM, true); @@ -550,7 +550,7 @@ error: found argument '--files-without-matches' which wasn't expected, or isn't Usage: ripgrep-616 --files-without-match -For more information try '--help' +For more information, try '--help'. "; let cmd = Command::new("ripgrep-616") diff --git a/tests/builder/possible_values.rs b/tests/builder/possible_values.rs index af43f63a..d7a8c481 100644 --- a/tests/builder/possible_values.rs +++ b/tests/builder/possible_values.rs @@ -183,7 +183,7 @@ error: 'slo' isn't a valid value for '-O