Skip to content

Commit

Permalink
test(help): Show padding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Aug 22, 2023
1 parent 0a87008 commit afefdc9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/builder/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,23 @@ Options:
utils::assert_output(cmd, "ctest --help", ISSUE_777, false);
}

#[test]
fn dont_strip_padding_issue_5083() {
let cmd = Command::new("test")
.help_template("{subcommands}")
.subcommands([
Command::new("one"),
Command::new("two"),
Command::new("three"),
]);
static EXPECTED: &str = "one
two
three
help Print this message or the help of the given subcommand(s)
";
utils::assert_output(cmd, "test --help", EXPECTED, false);
}

static OVERRIDE_HELP_SHORT: &str = "\
Usage: test
Expand Down

0 comments on commit afefdc9

Please sign in to comment.