mirror of
https://github.com/clap-rs/clap
synced 2025-01-18 23:53:54 +00:00
test(help): Show bad subcommand wrapping
This commit is contained in:
parent
e1f6320730
commit
58b5bd89ea
1 changed files with 22 additions and 2 deletions
|
@ -566,10 +566,20 @@ fn wrapped_help() {
|
|||
.long("no-git-push")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help("Do not push generated commit and tags to git remote"),
|
||||
)
|
||||
.subcommand(
|
||||
Command::new("sub1")
|
||||
.about("One two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen")
|
||||
);
|
||||
|
||||
let expected = str![[r#"
|
||||
Usage: test [OPTIONS]
|
||||
Usage: test [OPTIONS] [COMMAND]
|
||||
|
||||
Commands:
|
||||
sub1 One two three four five six seven eight nine ten eleven
|
||||
twelve thirteen fourteen fifteen
|
||||
help Print this message or the help of the given
|
||||
subcommand(s)
|
||||
|
||||
Options:
|
||||
-a, --all Also do versioning for private crates (will
|
||||
|
@ -614,10 +624,20 @@ fn unwrapped_help() {
|
|||
.long("no-git-push")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help("Do not push generated commit and tags to git remote"),
|
||||
)
|
||||
.subcommand(
|
||||
Command::new("sub1")
|
||||
.about("One two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen")
|
||||
);
|
||||
|
||||
let expected = str![[r#"
|
||||
Usage: test [OPTIONS]
|
||||
Usage: test [OPTIONS] [COMMAND]
|
||||
|
||||
Commands:
|
||||
sub1 One two three four five six seven eight nine ten eleven
|
||||
twelve thirteen fourteen fifteen
|
||||
help Print this message or the help of the given
|
||||
subcommand(s)
|
||||
|
||||
Options:
|
||||
-a, --all Also do versioning for private crates (will
|
||||
|
|
Loading…
Reference in a new issue