From aa3f47c23922a8f6e7d462b65e90f3bbf47b1398 Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen Date: Mon, 7 Aug 2023 14:01:16 +0700 Subject: [PATCH] test(complete): Help for possible value --- clap_complete/tests/testsuite/dynamic.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clap_complete/tests/testsuite/dynamic.rs b/clap_complete/tests/testsuite/dynamic.rs index 452a638a447..2755f33bd4c 100644 --- a/clap_complete/tests/testsuite/dynamic.rs +++ b/clap_complete/tests/testsuite/dynamic.rs @@ -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)? $(,)?) => { @@ -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"), );