fix(error): Match rustc for giving more information

This commit is contained in:
Ed Page 2023-01-03 13:22:35 -06:00
parent c2efb60a5f
commit 68a7740fdc
35 changed files with 107 additions and 107 deletions

View file

@ -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] <COMMAND>
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'.
```

View file

@ -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] [-- <SLOP>...]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -37,7 +37,7 @@ error: found argument 'foo' which wasn't expected, or isn't valid in this contex
Usage: escaped-positional[EXE] [OPTIONS] [-- <SLOP>...]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -71,7 +71,7 @@ error: the argument '--search <search>...' cannot be used with '--info'
Usage: pacman[EXE] {sync|--sync|-S} --search <search>... <package>...
For more information try '--help'
For more information, try '--help'.
```

View file

@ -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'.
```

View file

@ -42,6 +42,6 @@ $ 04_01_enum medium
error: 'medium' isn't a valid value for '<MODE>'
[possible values: fast, slow]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -22,6 +22,6 @@ $ 04_01_possible medium
error: 'medium' isn't a valid value for '<MODE>'
[possible values: fast, slow]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -18,12 +18,12 @@ $ 04_02_parse foobar
? failed
error: invalid value 'foobar' for '<PORT>': 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 '<PORT>': 0 is not in 1..=65535
For more information try '--help'
For more information, try '--help'.
```

View file

@ -18,12 +18,12 @@ $ 04_02_validate foobar
? failed
error: invalid value 'foobar' for '<PORT>': `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>': port not in range 1-65535
For more information try '--help'
For more information, try '--help'.
```

View file

@ -24,7 +24,7 @@ error: the following required arguments were not provided:
Usage: 04_03_relations[EXE] <--set-ver <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 <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 <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
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

View file

@ -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

View file

@ -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'.
```

View file

@ -42,6 +42,6 @@ $ 04_01_enum_derive medium
error: 'medium' isn't a valid value for '<MODE>'
[possible values: fast, slow]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -18,12 +18,12 @@ $ 04_02_parse_derive foobar
? failed
error: invalid value 'foobar' for '<PORT>': 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 '<PORT>': 0 is not in 1..=65535
For more information try '--help'
For more information, try '--help'.
```

View file

@ -18,12 +18,12 @@ $ 04_02_validate_derive foobar
? failed
error: invalid value 'foobar' for '<PORT>': `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>': port not in range 1-65535
For more information try '--help'
For more information, try '--help'.
```

View file

@ -24,7 +24,7 @@ error: the following required arguments were not provided:
Usage: 04_03_relations_derive[EXE] <--set-ver <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 <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 <CONFIG> <--set-ver <VER>|--major|--minor|--patch> <INPUT_FILE|--spec-in <SPEC_IN>>
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

View file

@ -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

View file

@ -26,7 +26,7 @@ $ typed-derive -O plaid
? failed
error: invalid value 'plaid' for '-O <OPTIMIZATION>': 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 <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 <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 <DEFINES>': 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 <DEFINES>': 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 <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 <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 <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 <LOG_LEVEL>'
[possible values: info, debug, info, warn, error]
For more information try '--help'
For more information, try '--help'.
```

View file

@ -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");
}

View file

@ -67,7 +67,7 @@ error: 'sc_required' requires a subcommand but one was not provided
Usage: sc_required <COMMAND>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("sc_required")

View file

@ -325,7 +325,7 @@ error: the argument '--flag...' cannot be used with '-F'
Usage: clap-test --flag... --long-option-2 <option2> <positional> <positional2> [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 <option2> <positional> <positional2> [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 <option2> <positional> <positional2> [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 <option2> <positional> <positional2> [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 <COMMAND>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("test")

View file

@ -735,7 +735,7 @@ error: the following required arguments were not provided:
Usage: bug <input>
For more information try '--help'
For more information, try '--help'.
",
true,
);

View file

@ -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"]);

View file

@ -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);

View file

@ -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);
}

View file

@ -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 <arg>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("test").arg(Arg::new("arg").action(ArgAction::Set).required(true));

View file

@ -136,7 +136,7 @@ fn req_group_usage_string() {
Usage: clap-test <base|--delete>
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 <base|--delete>
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")

View file

@ -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());
}

View file

@ -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 <opt>... [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")

View file

@ -183,7 +183,7 @@ error: 'slo' isn't a valid value for '-O <option>'
note: value 'slow' exists
For more information try '--help'
For more information, try '--help'.
";
#[cfg(not(feature = "suggestions"))]
@ -191,7 +191,7 @@ For more information try '--help'
error: 'slo' isn't a valid value for '-O <option>'
[possible values: slow, fast, \"ludicrous speed\"]
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(
@ -217,7 +217,7 @@ error: 'slo' isn't a valid value for '-O <option>'
note: value 'slow' exists
For more information try '--help'
For more information, try '--help'.
";
#[cfg(not(feature = "suggestions"))]
@ -225,7 +225,7 @@ For more information try '--help'
error: 'slo' isn't a valid value for '-O <option>'
[possible values: slow, fast, \"ludicrous speed\"]
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(
@ -255,7 +255,7 @@ error: 'slo' isn't a valid value for '-O <option>'
note: value 'slow' exists
For more information try '--help'
For more information, try '--help'.
";
#[cfg(not(feature = "suggestions"))]
@ -263,7 +263,7 @@ For more information try '--help'
error: 'slo' isn't a valid value for '-O <option>'
[possible values: slow, fast, \"ludicrous speed\"]
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(
@ -294,7 +294,7 @@ error: 'ludicrous' isn't a valid value for '-O <option>'
note: value 'ludicrous speed' exists
For more information try '--help'
For more information, try '--help'.
";
#[cfg(not(feature = "suggestions"))]
@ -302,7 +302,7 @@ For more information try '--help'
error: 'ludicrous' isn't a valid value for '-O <option>'
[possible values: slow, fast, \"ludicrous speed\"]
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(
@ -325,7 +325,7 @@ fn missing_possible_value_error() {
error: the argument '-O <option>' requires a value but none was supplied
[possible values: slow, fast, \"ludicrous speed\"]
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(

View file

@ -90,7 +90,7 @@ error: the following required arguments were not provided:
Usage: clap-test <flag> <opt> [bar]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("positional_required")
@ -110,7 +110,7 @@ error: the following required arguments were not provided:
Usage: clap-test <flag> [opt] [bar]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("positional_required")
@ -131,7 +131,7 @@ error: the following required arguments were not provided:
Usage: clap-test <flag> <foo> <opt> [bar]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("positional_required")
@ -520,7 +520,7 @@ error: the following required arguments were not provided:
Usage: clap-test --long-option-2 <option2> -F <positional> <positional2> [positional3]...
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(utils::complex_app(), "clap-test -F", MISSING_REQ, true);
@ -763,7 +763,7 @@ error: the following required arguments were not provided:
Usage: test --target <target> --input <input> --output <output>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("Test cmd")
@ -807,7 +807,7 @@ error: the following required arguments were not provided:
Usage: test --target <target> --input <input> --output <output>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("Test cmd")
@ -932,7 +932,7 @@ error: the following required arguments were not provided:
Usage: clap-test --opt=<FILE>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("clap-test").version("v1.4.8").arg(
@ -956,7 +956,7 @@ error: the following required arguments were not provided:
Usage: clap-test --opt=<FILE> --foo=<FILE>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("clap-test")
@ -991,7 +991,7 @@ error: the following required arguments were not provided:
Usage: clap-test --opt=<FILE> --foo=<FILE> <--g1=<FILE>|--g2=<FILE>>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("clap-test")
@ -1071,7 +1071,7 @@ error: the following required arguments were not provided:
Usage: test --c <c> --a <a> --b <b>
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("test")
.arg(
@ -1116,7 +1116,7 @@ error: the following required arguments were not provided:
Usage: example -x <X> -y <Y> -z <Z> <ID>
For more information try '--help'
For more information, try '--help'.
";
let cmd = issue_1158_app();
@ -1451,7 +1451,7 @@ error: the argument '-b <b>' cannot be used with '-c <c>'
Usage: clap-test -b <b> <a>
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(cmd, "clap-test aaa -b bbb -c ccc", EXPECTED, true);
}
@ -1474,7 +1474,7 @@ error: the following required arguments were not provided:
Usage: test --require-first <--first|--second>
For more information try '--help'
For more information, try '--help'.
";
utils::assert_output(cmd, "test --require-first --second", EXPECTED, true);
}

View file

@ -105,7 +105,7 @@ error: the subcommand 'subcm' wasn't recognized
Usage: dym [COMMAND]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("dym").subcommand(Command::new("subcmd"));
@ -125,7 +125,7 @@ error: the subcommand 'te' wasn't recognized
Usage: dym [COMMAND]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("dym")
@ -145,7 +145,7 @@ error: found argument '--subcmarg' which wasn't expected, or isn't valid in this
Usage: dym [COMMAND]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("dym")
@ -163,7 +163,7 @@ error: found argument '--subcmarg' which wasn't expected, or isn't valid in this
Usage: dym [COMMAND]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("dym")
@ -357,7 +357,7 @@ error: found argument 'subcmd' which wasn't expected, or isn't valid in this con
Usage: cmd [COMMAND]
For more information try '--help'
For more information, try '--help'.
";
let cmd = Command::new("cmd").subcommand(Command::new("subcmd"));
@ -432,7 +432,7 @@ fn subcommand_not_recognized() {
Usage: fake [COMMAND]
For more information try '--help'
For more information, try '--help'.
",
true,
);
@ -506,7 +506,7 @@ error: the subcommand 'world' wasn't recognized
Usage: <COMMAND>
For more information try 'help'
For more information, try 'help'.
";
utils::assert_eq(HELLO_EXPECTED, err.to_string());
@ -522,7 +522,7 @@ error: the subcommand 'baz' wasn't recognized
Usage: <COMMAND>
For more information try 'help'
For more information, try 'help'.
";
utils::assert_eq(BAZ_EXPECTED, err.to_string());
}

View file

@ -50,7 +50,7 @@ error: the following required arguments were not provided:
Usage: prog --add <CRATES|--path <PATH>|--git <GIT>>
For more information try '--help'
For more information, try '--help'.
";
assert_output::<Opt>("prog --add", OUTPUT, true);

View file

@ -223,7 +223,7 @@ fn derive_generated_error_has_full_context() {
Usage: clap --req-str <REQ_STR>
clap <COMMAND>
For more information try '--help'
For more information, try '--help'.
"#;
assert_eq!(result.unwrap_err().to_string(), expected);
}

View file

@ -7,5 +7,5 @@ error: found argument '--unknown-argument' which wasn't expected, or isn't valid
Usage: stdio-fixture[EXE] [OPTIONS] [COMMAND]
For more information try '--help'
For more information, try '--help'.
"""