Skip to content

Commit a216137

Browse files
committed
test(mangen): Add test for flatten_help
This test shows that the output stays the same independent of the value of `flatten_help`. Further commits may implement `flatten_help` for `clap_mangen`. Signed-off-by: Paul Spooren <[email protected]>
1 parent 61f5ee5 commit a216137

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clap_mangen/tests/testsuite/roff.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,17 @@ fn value_name_without_arg() {
105105
cmd,
106106
);
107107
}
108+
109+
#[test]
110+
fn flatten_help_false() {
111+
let name = "my-app";
112+
let cmd = common::basic_command(name).flatten_help(false);
113+
common::assert_matches(snapbox::file!["../snapshots/basic.bash.roff"], cmd);
114+
}
115+
116+
#[test]
117+
fn flatten_help_true() {
118+
let name = "my-app";
119+
let cmd = common::basic_command(name).flatten_help(true);
120+
common::assert_matches(snapbox::file!["../snapshots/basic.bash.roff"], cmd);
121+
}

0 commit comments

Comments
 (0)