Skip to content

Commit

Permalink
Merge pull request #3471 from de-vri-es/unsupported-parser-ui-test
Browse files Browse the repository at this point in the history
test: Add UI test for unsupported parsers.
  • Loading branch information
epage committed Feb 15, 2022
2 parents bbf4722 + bd68653 commit 88f5ad1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/derive_ui/unsupported_parser.rs
@@ -0,0 +1,11 @@
use clap::Parser;

#[derive(Parser, Clone, Debug)]
struct Opt {
#[clap(parse(not_a_valid_parser))]
value: i8,
}

fn main() {
println!("{:?}", Opt::parse());
}
5 changes: 5 additions & 0 deletions tests/derive_ui/unsupported_parser.stderr
@@ -0,0 +1,5 @@
error: unsupported parser `not_a_valid_parser`
--> tests/derive_ui/unsupported_parser.rs:5:18
|
5 | #[clap(parse(not_a_valid_parser))]
| ^^^^^^^^^^^^^^^^^^

0 comments on commit 88f5ad1

Please sign in to comment.