Skip to content

Commit

Permalink
test(complete): Test help for dynamic completion of possible value
Browse files Browse the repository at this point in the history
  • Loading branch information
ModProg committed Aug 7, 2023
1 parent 65b9c2b commit 4bf88cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clap_complete/tests/testsuite/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::path::Path;

use clap::Command;
use clap::{builder::PossibleValue, Command};

macro_rules! complete {
($cmd:expr, $input:expr$(, current_dir = $current_dir:expr)? $(,)?) => {
Expand Down Expand Up @@ -61,13 +61,13 @@ fn suggest_long_flag_subset() {
fn suggest_possible_value_subset() {
let name = "exhaustive";
let mut cmd = Command::new(name).arg(clap::Arg::new("hello-world").value_parser([
"hello-world",
"hello-moon",
"goodbye-world",
PossibleValue::new("hello-world").help("Say hello to the world"),
"hello-moon".into(),
"goodbye-world".into(),
]));

snapbox::assert_eq(
"hello-world
"hello-world\tSay hello to the world
hello-moon",
complete!(cmd, "hello"),
);
Expand Down

0 comments on commit 4bf88cb

Please sign in to comment.