Issue by rami3l
Thursday Jul 29, 2021 at 19:22 GMT
Originally opened as clap-rs/clap#2639
Please complete the following tasks
Rust Version
1.54.0
Clap Version
master
Minimal reproducible code
#[test]
fn doc_comments_raw_macro() {
macro_rules! doc_lorem_ipsum {
() => {
"Lorem ipsum"
};
(inner) => {
"Fooify a bar and a baz"
};
}
#[doc = doc_lorem_ipsum!()]
#[derive(Clap, PartialEq, Debug)]
struct LoremIpsum {
#[doc = doc_lorem_ipsum!(inner)]
#[clap(short, long)]
foo: bool,
}
let help = get_long_help::<LoremIpsum>();
assert!(help.contains("Lorem ipsum"));
assert!(help.contains("Fooify a bar and a baz"));
}
Steps to reproduce the bug with the above code
Run the test above.
Actual Behaviour
Assertions fail with no comments help message detected:
%%% LONG_HELP %%%:=====
clap_derive
USAGE:
clap_derive [FLAGS]
FLAGS:
-f, --foo
-h, --help
Prints help information
-V, --version
Prints version information
=====
Expected Behaviour
Assertions pass with all help messages specified by the macro call.
%%% LONG_HELP %%%:=====
clap_derive
<- We should see some help messages here...
USAGE:
clap_derive [FLAGS]
FLAGS:
-f, --foo <- And here...
-h, --help
Prints help information
-V, --version
Prints version information
=====
Additional Context
No response
Debug Output
No response
Thursday Jul 29, 2021 at 19:22 GMT
Originally opened as clap-rs/clap#2639
Please complete the following tasks
Rust Version
1.54.0
Clap Version
master
Minimal reproducible code
Steps to reproduce the bug with the above code
Run the test above.
Actual Behaviour
Assertions fail with no comments help message detected:
Expected Behaviour
Assertions pass with all help messages specified by the macro call.
Additional Context
No response
Debug Output
No response