mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
test: add failing test for #2022
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
This commit is contained in:
parent
7df091775c
commit
659d688543
1 changed files with 9 additions and 0 deletions
|
@ -510,3 +510,12 @@ fn long_eq_val_starts_with_eq() {
|
|||
|
||||
assert_eq!("=value", matches.value_of("opt").unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2022_get_flags_misuse() {
|
||||
let app = App::new("test")
|
||||
.help_heading("test")
|
||||
.arg(Arg::new("a").long("a").default_value("32"));
|
||||
let matches = app.get_matches_from(&[""]);
|
||||
assert!(matches.value_of("a").is_some())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue