mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 15:22:30 +00:00
12 lines
391 B
Rust
12 lines
391 B
Rust
|
#[test]
|
||
|
fn infer_value_hint_for_path_buf() {
|
||
|
let mut cmd = clap::Command::new("completer")
|
||
|
.arg(clap::Arg::new("input").value_parser(clap::value_parser!(std::path::PathBuf)));
|
||
|
cmd.build();
|
||
|
let input = cmd
|
||
|
.get_arguments()
|
||
|
.find(|arg| arg.get_id() == "input")
|
||
|
.unwrap();
|
||
|
assert_eq!(input.get_value_hint(), clap::builder::ValueHint::AnyPath);
|
||
|
}
|