Skip to content

Commit

Permalink
test: Add test case for completing custom value of argument
Browse files Browse the repository at this point in the history
  • Loading branch information
shannmu committed Aug 8, 2024
1 parent 999071c commit bbb2e6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clap_complete/tests/testsuite/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ val3
);
}

#[test]
fn suggest_custom_arg_value() {
let mut cmd = Command::new("dynamic").arg(clap::Arg::new("custom").long("custom"));

assert_data_eq!(complete!(cmd, "--custom [TAB]"), snapbox::str![""],);
}

#[test]
fn suggest_multi_positional() {
let mut cmd = Command::new("dynamic")
Expand Down

0 comments on commit bbb2e6f

Please sign in to comment.