Skip to content

Commit aa3f47c

Browse files
committed
test(complete): Help for possible value
1 parent 65b9c2b commit aa3f47c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clap_complete/tests/testsuite/dynamic.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::path::Path;
44

5-
use clap::Command;
5+
use clap::{builder::PossibleValue, Command};
66

77
macro_rules! complete {
88
($cmd:expr, $input:expr$(, current_dir = $current_dir:expr)? $(,)?) => {
@@ -61,13 +61,13 @@ fn suggest_long_flag_subset() {
6161
fn suggest_possible_value_subset() {
6262
let name = "exhaustive";
6363
let mut cmd = Command::new(name).arg(clap::Arg::new("hello-world").value_parser([
64-
"hello-world",
65-
"hello-moon",
66-
"goodbye-world",
64+
PossibleValue::new("hello-world").help("Say hello to the world"),
65+
"hello-moon".into(),
66+
"goodbye-world".into(),
6767
]));
6868

6969
snapbox::assert_eq(
70-
"hello-world
70+
"hello-world\tSay hello to the world
7171
hello-moon",
7272
complete!(cmd, "hello"),
7373
);

0 commit comments

Comments
 (0)