mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
test(completion): add regression test for fish quoting issue
This commit is contained in:
parent
86864b004b
commit
0fbabaa3fe
1 changed files with 4 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
use clap::PossibleValue;
|
||||
|
||||
use super::*;
|
||||
|
||||
fn build_app() -> App<'static> {
|
||||
|
@ -172,6 +174,7 @@ fn build_app_sub_subcommands() -> App<'static> {
|
|||
Arg::new("config")
|
||||
.long("--config")
|
||||
.takes_value(true)
|
||||
.possible_values([PossibleValue::new("Lest quotes aren't escaped.")])
|
||||
.help("the other case to test"),
|
||||
),
|
||||
),
|
||||
|
@ -190,7 +193,7 @@ complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen
|
|||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -s V -l version -d 'Print version information'
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "sub_cmd" -d 'sub-subcommand'
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and not __fish_seen_subcommand_from sub_cmd; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -l config -d 'the other case to test' -r
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -l config -d 'the other case to test' -r -f -a "{Lest quotes aren't escaped. }"
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s h -l help -d 'Print help information'
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from sub_cmd" -s V -l version -d 'Print version information'
|
||||
complete -c my_app -n "__fish_seen_subcommand_from some_cmd; and __fish_seen_subcommand_from help" -s h -l help -d 'Print help information'
|
||||
|
|
Loading…
Reference in a new issue