mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
test(derive): Unwrap, don't exit
This commit is contained in:
parent
9aa76fa12f
commit
7b69dea24f
3 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ fn update_basic() {
|
|||
|
||||
let mut opt = Opt::try_parse_from(["test", "-a0"]).unwrap();
|
||||
|
||||
opt.update_from(["test", "-a42"]);
|
||||
opt.try_update_from(["test", "-a42"]).unwrap();
|
||||
|
||||
assert_eq!(Opt { single_value: 42 }, opt);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ fn boxed_flatten_subcommand() {
|
|||
fn update_boxed_flatten_subcommand() {
|
||||
let mut opt = Opt::try_parse_from(["test", "flame", "1"]).unwrap();
|
||||
|
||||
opt.update_from(["test", "flame", "42"]);
|
||||
opt.try_update_from(["test", "flame", "42"]).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
Opt {
|
||||
|
|
|
@ -30,7 +30,7 @@ fn skip_1() {
|
|||
);
|
||||
opt.s = 42;
|
||||
|
||||
opt.update_from(["test", "-x", "22"]);
|
||||
opt.try_update_from(["test", "-x", "22"]).unwrap();
|
||||
|
||||
assert_eq!(opt, Opt { x: 22, s: 42 });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue