xref: /third_party/rust/crates/clap/clap_complete/tests/general.rs (revision 19625d8c)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/clap/clap_complete/tests/
1#[test]
2fn infer_value_hint_for_path_buf() {
3    let mut cmd = clap::Command::new("completer")
4        .arg(clap::Arg::new("input").value_parser(clap::value_parser!(std::path::PathBuf)));
5    cmd.build();
6    let input = cmd
7        .get_arguments()
8        .find(|arg| arg.get_id() == "input")
9        .unwrap();
10    assert_eq!(input.get_value_hint(), clap::builder::ValueHint::AnyPath);
11}
12

Indexes created Thu Nov 07 10:32:03 CST 2024