Skip to content

Commit d5c2884

Browse files
committed
test(mangen): Add all flatten related tests from builder
Add all tests from tests/builder/help.rs to mangen, too. Signed-off-by: Paul Spooren <[email protected]>
1 parent eeb3ad0 commit d5c2884

11 files changed

+91
-37
lines changed

Diff for: clap_mangen/tests/snapshots/flatten_arg_required.roff

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR <\fB\-\-parent\fR> [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR <\fB\-\-parent\fR> [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR <\fB\-\-child\fR> [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
23+
\fBtest\fR <\fB\-\-child\fR> [\fB\-h\fR|\fB\-\-help\fR]
2024
test command
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_basic.roff

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
23+
\fBtest\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
2024
test command
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_help_cmd.roff

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ bar
1620
Print help (see a summary with \*(Aq\-h\*(Aq)
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
20-
test command
23+
\fBtest\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
24+
long some
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_hidden_command.roff

+12-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent child1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent child2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
12+
.br
13+
\fBparent child3\fR [\fB\-\-child3\fR] [\fB\-h\fR|\fB\-\-help\fR]
14+
.br
15+
\fBparent help\fR
816
.SH DESCRIPTION
917
parent command
1018
.SH OPTIONS
@@ -16,11 +24,11 @@ parent command
1624
Print help
1725
.SH SUBCOMMANDS
1826
.TP
19-
parent\-child1(1)
27+
\fBchild1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
2028
child1 command
2129
.TP
22-
parent\-child2(1)
30+
\fBchild2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
2331
child2 command
2432
.TP
25-
parent\-help(1)
33+
\fBhelp\fR
2634
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_not_recursive.roff

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent child1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent child2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
12+
.br
13+
\fBparent child3\fR [\fB\-\-child3\fR] [\fB\-h\fR|\fB\-\-help\fR]
14+
.br
15+
\fBparent help\fR
816
.SH DESCRIPTION
917
parent command
1018
.SH OPTIONS
@@ -16,14 +24,14 @@ parent command
1624
Print help
1725
.SH SUBCOMMANDS
1826
.TP
19-
parent\-child1(1)
27+
\fBchild1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
2028
child1 command
2129
.TP
22-
parent\-child2(1)
30+
\fBchild2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
2331
child2 command
2432
.TP
25-
parent\-child3(1)
33+
\fBchild3\fR [\fB\-\-child3\fR] [\fB\-h\fR|\fB\-\-help\fR]
2634
child3 command
2735
.TP
28-
parent\-help(1)
36+
\fBhelp\fR
2937
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_recursive.roff

+12-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent child1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent child2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
12+
.br
13+
\fBparent child3\fR [\fB\-\-child3\fR] [\fB\-h\fR|\fB\-\-help\fR]
14+
.br
15+
\fBparent help\fR
816
.SH DESCRIPTION
917
parent command
1018
.SH OPTIONS
@@ -16,11 +24,11 @@ parent command
1624
Print help
1725
.SH SUBCOMMANDS
1826
.TP
19-
parent\-child1(1)
27+
\fBchild1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
2028
child1 command
2129
.TP
22-
parent\-child2(1)
30+
\fBchild2\fR [\fB\-\-child2\fR] [\fB\-h\fR|\fB\-\-help\fR]
2331
child2 command
2432
.TP
25-
parent\-help(1)
33+
\fBhelp\fR
2634
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_single_hidden_command.roff

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent child1\fR [\fB\-\-child1\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,5 +20,5 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-help(1)
23+
\fBhelp\fR
2024
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_with_args_conflicts_with_subcommands.roff

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
23+
\fBtest\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
2024
test command
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_with_external_subcommand.roff

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
23+
\fBtest\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
2024
test command
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_with_global.roff

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIsubcommands\fR]
7+
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
10+
.br
11+
\fBparent help\fR
812
.SH DESCRIPTION
913
parent command
1014
.SH OPTIONS
@@ -16,8 +20,8 @@ parent command
1620
Print help
1721
.SH SUBCOMMANDS
1822
.TP
19-
parent\-test(1)
23+
\fBtest\fR [\fB\-\-child\fR] [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR]
2024
test command
2125
.TP
22-
parent\-help(1)
26+
\fBhelp\fR
2327
Print this message or the help of the given subcommand(s)

Diff for: clap_mangen/tests/snapshots/flatten_with_subcommand_required.roff

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
.SH NAME
55
parent \- parent command
66
.SH SYNOPSIS
7-
\fBparent\fR [\fB\-\-parent\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIsubcommands\fR>
7+
\fBparent test\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
8+
.br
9+
\fBparent help\fR
810
.SH DESCRIPTION
911
parent command
1012
.SH OPTIONS
@@ -16,8 +18,8 @@ parent command
1618
Print help
1719
.SH SUBCOMMANDS
1820
.TP
19-
parent\-test(1)
21+
\fBtest\fR [\fB\-\-child\fR] [\fB\-h\fR|\fB\-\-help\fR]
2022
test command
2123
.TP
22-
parent\-help(1)
24+
\fBhelp\fR
2325
Print this message or the help of the given subcommand(s)

0 commit comments

Comments
 (0)