mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 15:22:30 +00:00
56a6a7418e
This also opens us up to being more unicode aware in other places, like our sorting of arguments in the help. Fixes #2792
17 lines
488 B
Rust
17 lines
488 B
Rust
#[test]
|
|
#[cfg(feature = "unicode")]
|
|
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());
|
|
}
|