diff --git a/tests/help.rs b/tests/help.rs index 1fc101ae..6713f6ca 100644 --- a/tests/help.rs +++ b/tests/help.rs @@ -1443,4 +1443,49 @@ fn multiple_custom_help_headers() { MULTIPLE_CUSTOM_HELP_SECTIONS, false )); -} \ No newline at end of file +} + +static ISSUE_897: &'static str = "ctest-foo 0.1 +Long about foo + +USAGE: + ctest foo + +FLAGS: + -h, --help + Prints help information + + -V, --version + Prints version information"; + +#[test] +fn show_long_about_issue_897() { + let app = App::new("ctest") + .version("0.1") + .subcommand(SubCommand::with_name("foo") + .version("0.1") + .about("About foo") + .long_about("Long about foo")); + assert!(test::compare_output(app, "ctest foo --help", ISSUE_897, false)); +} + +static ISSUE_897_SHORT: &'static str = "ctest-foo 0.1 +Long about foo + +USAGE: + ctest foo + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information"; + +#[test] +fn show_short_about_issue_897() { + let app = App::new("ctest") + .version("0.1") + .subcommand(SubCommand::with_name("foo") + .version("0.1") + .about("About foo") + .long_about("Long about foo")); + assert!(test::compare_output(app, "ctest foo -h", ISSUE_897_SHORT, false)); +}