diff --git a/src/lib.rs b/src/lib.rs index 916de169..55a76afc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1228,5 +1228,18 @@ mod tests { assert!(m.is_present("color")); } + #[test] + fn multiple_flags_in_single() { + let m = App::new("multe_flags") + .args(vec![ + Arg::from_usage("-f, --flag 'some flag'"), + Arg::from_usage("-c, --color 'some other flag'"), + Arg::from_usage("-d, --debug 'another other flag'") + ]) + .get_matches_from(vec!["", "-fcd"]); + assert!(m.is_present("flag")); + assert!(m.is_present("color")); + assert!(m.is_present("debug")); + } } \ No newline at end of file