clap/tests/builder/legacy/unicode.rs
2022-06-07 16:21:37 -05:00

18 lines
504 B
Rust

#![cfg(feature = "unicode")]
#[test]
fn possible_values_ignore_case() {
let m = clap::Command::new("pv")
.arg(
clap::Arg::new("option")
.short('o')
.long("option")
.takes_value(true)
.possible_value("ä")
.ignore_case(true),
)
.try_get_matches_from(vec!["pv", "--option", "Ä"]);
assert!(m.is_ok(), "{}", m.unwrap_err());
assert!(m.unwrap().value_of("option").is_some());
}