tests: test for multiple flags in single

This commit is contained in:
Alexander Kuvaev 2015-08-22 00:04:36 +03:00
parent 56ea693084
commit 999456969d

View file

@ -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"));
}
}