Skip to content

Commit

Permalink
test(complete): Help for 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 aa3f47c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clap_complete/tests/testsuite/dynamic.rs
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 aa3f47c

Please sign in to comment.