blob: 876e7edd628233abebe0646711b6546cf4c6f6cb [file] [log] [blame]
Chih-Hung Hsiehbe338a12020-10-26 13:16:51 -07001use structopt::StructOpt;
2
3mod utils;
4use utils::*;
5
6#[test]
7fn invisible_group_issue_439() {
8 macro_rules! m {
9 ($bool:ty) => {
10 #[derive(Debug, StructOpt)]
11 struct Opts {
12 #[structopt(long = "x")]
13 x: $bool,
14 }
15 };
16 }
17
18 m!(bool);
19
20 let help = get_long_help::<Opts>();
21
22 assert!(help.contains("--x"));
23 assert!(!help.contains("--x <x>"));
24 Opts::from_iter_safe(&["test", "--x"]).unwrap();
25}