CLI: Reject invalid argument values rather than ignore them (#6723)
* CLI: Reject invalid argument values rather than ignore them * Fix grumbles
This commit is contained in:
committed by
Arkadiy Paronyan
parent
ba6594e30a
commit
d77dabadbb
@@ -1203,6 +1203,16 @@ mod tests {
|
||||
use toml;
|
||||
use clap::{ErrorKind as ClapErrorKind};
|
||||
|
||||
|
||||
#[test]
|
||||
fn should_reject_invalid_values() {
|
||||
let args = Args::parse(&["parity", "--cache=20"]);
|
||||
assert!(args.is_ok());
|
||||
|
||||
let args = Args::parse(&["parity", "--cache=asd"]);
|
||||
assert!(args.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_parse_args_and_flags() {
|
||||
let args = Args::parse(&["parity", "--no-warp"]).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user