clap/clap_derive/tests
Ed Page 4b7ed54d7e test(derive): Provide better error info
`Parser::parse_from` will call `exit` on failure and we don't just lose
backtrace information but we don't even know which of the tests running
in parallel panicked.  I ran into this when experimenting with
`clap_derive` and I couldn't tell what actually failed.

So let's switch to `Parse::try_parse_from`.

Errors went from:
```
test option_option ... ok
error: Found argument 'bar' which wasn't expected, or isn't valid in this context

USAGE:
    clap_derive [OPTIONS]

For more information try --help
error: test failed, to rerun pass '--test arg_enum'
```
To:
```
test option_option ... ok
test variant_with_defined_casing ... ok
test skip_variant ... ok
test default_value ... ok
test vector ... FAILED
test option_vector ... ok

failures:

---- vector stdout ----
thread 'vector' panicked at 'called `Result::unwrap()` on an `Err` value: Error { message: Formatted(Colorizer { use_stderr: true, color_when: Auto
, pieces: [("error:", Some(Red)), (" ", None), ("Found argument '", None), ("bar", Some(Yellow)), ("' which wasn't expected, or isn't valid in this
 context", None), ("\n\n", None), ("USAGE:\n    clap_derive [OPTIONS]", None), ("\n\nFor more information try ", None), ("--help", Some(Green)), ("
\n", None)] }), kind: UnknownArgument, info: ["bar"], source: None, backtrace: Backtrace }', clap_derive/tests/arg_enum.rs:388:56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    vector

test result: FAILED. 15 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass '--test arg_enum'
```
2021-10-30 10:00:34 -05:00
..
ui fix(derive): Support 'update' with 'flatten' 2021-10-15 14:19:16 -05:00
app_name.rs fix(derive)!: Rename Clap to Parser. 2021-10-09 20:12:03 -05:00
arg_enum.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
argument_naming.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
arguments.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
author_version_about.rs fix(derive)!: Rename Clap to Parser. 2021-10-09 20:12:03 -05:00
basic.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
boxed.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
custom-string-parsers.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
default_value.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
deny-warnings.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
doc-comments-help.rs fix ArgEnum multiline doc comment 2021-10-19 18:34:54 +03:00
explicit_name_no_renaming.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
flags.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
flatten.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
help.rs test(derive): Verify derive-genned errors are formatted 2021-10-29 16:09:07 -05:00
issues.rs fix(derive): Don't duplicate subcommand aliases 2021-10-26 16:01:05 -05:00
nested-subcommands.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
nested.rs fix(derive)!: Rename Clap to Parser. 2021-10-09 20:12:03 -05:00
non_literal_attributes.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
options.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
privacy.rs docs(derive): Use more-specific traits 2021-10-12 07:51:11 -05:00
raw_bool_literal.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
raw_idents.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
rename_all_env.rs feat(doc): Fix many typos in docs, comments and codes found by typos-cli 2021-10-19 10:38:22 +09:00
skip.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
special_types.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
subcommands.rs test(derive): Provide better error info 2021-10-30 10:00:34 -05:00
ui.rs Bump MSRV to 1.54.0 2021-07-30 10:19:21 +01:00
utf8.rs fix(derive)!: Rename Clap to Parser. 2021-10-09 20:12:03 -05:00
utils.rs Fix test 2020-07-06 17:26:53 +03:00