mirror of
https://github.com/clap-rs/clap
synced 2024-11-12 23:57:10 +00:00
test(derive): Verify long_help behavior
This commit is contained in:
parent
c1a9da9124
commit
8751152316
1 changed files with 15 additions and 0 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue