Skip to content

Commit

Permalink
test(derive): Verify long_help behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 7, 2022
1 parent c1a9da9 commit 8751152
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/derive/doc_comments_help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,18 @@ Options:
";
utils::assert_output::<Cmd>("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::<LoremIpsum>();
assert!(help.contains("Fooify a bar and a baz"));
}

0 comments on commit 8751152

Please sign in to comment.