Lines Matching defs:opt
117 let mut opt = Opt {
120 opt.try_update_from(["test"]).unwrap();
121 assert_eq!(Opt::try_parse_from(["test", "42"]).unwrap(), opt);
123 let mut opt = Opt {
126 opt.try_update_from(["test", "52"]).unwrap();
127 assert_eq!(Opt::try_parse_from(["test", "52"]).unwrap(), opt);
168 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
169 opt.try_update_from(["test", "command1", "42", "44"])
173 opt
176 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
177 opt.try_update_from(["test", "command1", "42"]).unwrap();
180 opt
183 let mut opt = Opt::BaseCli(BaseCli::Command1(Command1 { arg1: 12, arg2: 14 }));
184 opt.try_update_from(["test", "command2", "43"]).unwrap();
187 opt