From 87511523165ee7caededa44eeca13fa250f2b426 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 7 Nov 2022 09:34:15 -0600 Subject: [PATCH] test(derive): Verify long_help behavior --- tests/derive/doc_comments_help.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/derive/doc_comments_help.rs b/tests/derive/doc_comments_help.rs index 8aa4fa1e567..c7eff65a9dd 100644 --- a/tests/derive/doc_comments_help.rs +++ b/tests/derive/doc_comments_help.rs @@ -288,3 +288,18 @@ Options: "; utils::assert_output::("cmd --help", OUTPUT, false); } + +#[test] +fn force_long_help() { + /// Lorem ipsum + #[derive(Parser, PartialEq, Debug)] + struct LoremIpsum { + /// Fooify a bar + /// and a baz. + #[arg(short, long)] + foo: bool, + } + + let help = utils::get_long_help::(); + assert!(help.contains("Fooify a bar and a baz")); +}