diff --git a/tests/positionals.rs b/tests/positionals.rs index cf7cf468..3a4ecac9 100644 --- a/tests/positionals.rs +++ b/tests/positionals.rs @@ -233,4 +233,14 @@ fn last_positional_no_double_dash() { .get_matches_from_safe(vec!["test", "tgt", "crp", "arg"]); assert!(r.is_err()); assert_eq!(r.unwrap_err().kind, ErrorKind::UnknownArgument); +} + +#[test] +fn last_positional_second_to_last_mult() { + let r = App::new("test") + .arg_from_usage(" 'some target'") + .arg_from_usage("[CORPUS]... 'some corpus'") + .arg(Arg::from_usage("[ARGS]... 'some file'").last(true)) + .get_matches_from_safe(vec!["test", "tgt", "crp1", "crp2", "--", "arg"]); + assert!(r.is_ok(), "{:?}", r.unwrap_err().kind); } \ No newline at end of file