Skip to content

Commit

Permalink
test: Add UI test for unsupported parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Feb 15, 2022
1 parent bbf4722 commit bd68653
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 bd68653

Please sign in to comment.