clap/tests/unicode.rs

19 lines
490 B
Rust
Raw Normal View History

2021-10-16 21:05:42 +00:00
#![cfg(feature = "unicode")]
#[test]
fn possible_values_case_insensitive() {
let m = clap::App::new("pv")
.arg(
clap::Arg::new("option")
.short('o')
.long("--option")
.takes_value(true)
.possible_value("ä")
.case_insensitive(true),
)
.try_get_matches_from(vec!["pv", "--option", "Ä"]);
assert!(m.is_ok());
assert!(m.unwrap().value_of("option").is_some());
}