Lines Matching full:opt

14     struct Opt {  in required_option()  struct
19 Opt { arg: 42 }, in required_option()
20 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42"])) in required_option()
23 Opt { arg: 42 }, in required_option()
24 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "42"])) in required_option()
27 Opt { arg: 42 }, in required_option()
28 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--arg", "42"])) in required_option()
30 assert!(Opt::clap().get_matches_from_safe(&["test"]).is_err()); in required_option()
31 assert!(Opt::clap() in required_option()
39 struct Opt { in optional_option() struct
44 Opt { arg: Some(42) }, in optional_option()
45 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42"])) in optional_option()
48 Opt { arg: None }, in optional_option()
49 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in optional_option()
51 assert!(Opt::clap() in optional_option()
59 struct Opt { in option_with_default() struct
64 Opt { arg: 24 }, in option_with_default()
65 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a24"])) in option_with_default()
68 Opt { arg: 42 }, in option_with_default()
69 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in option_with_default()
71 assert!(Opt::clap() in option_with_default()
79 struct Opt { in option_with_raw_default() struct
84 Opt { arg: 24 }, in option_with_raw_default()
85 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a24"])) in option_with_raw_default()
88 Opt { arg: 42 }, in option_with_raw_default()
89 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in option_with_raw_default()
91 assert!(Opt::clap() in option_with_raw_default()
99 struct Opt { in options() struct
104 Opt { arg: vec![24] }, in options()
105 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a24"])) in options()
108 Opt { arg: vec![] }, in options()
109 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in options()
112 Opt { arg: vec![24, 42] }, in options()
113 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a24", "--arg", "42"])) in options()
120 struct Opt { in empy_default_value() struct
124 assert_eq!(Opt { arg: "".into() }, Opt::from_iter(&["test"])); in empy_default_value()
126 Opt { arg: "foo".into() }, in empy_default_value()
127 Opt::from_iter(&["test", "-afoo"]) in empy_default_value()
143 struct Opt { in option_from_str() struct
148 assert_eq!(Opt { a: None }, Opt::from_iter(&["test"])); in option_from_str()
149 assert_eq!(Opt { a: Some(A) }, Opt::from_iter(&["test", "foo"])); in option_from_str()
155 struct Opt { in optional_argument_for_optional_option() struct
161 Opt { in optional_argument_for_optional_option()
164 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42"])) in optional_argument_for_optional_option()
167 Opt { arg: Some(None) }, in optional_argument_for_optional_option()
168 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in optional_argument_for_optional_option()
171 Opt { arg: None }, in optional_argument_for_optional_option()
172 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in optional_argument_for_optional_option()
174 assert!(Opt::clap() in optional_argument_for_optional_option()
183 struct Opt { in two_option_options() struct
191 Opt { in two_option_options()
195 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42", "--field", "f"])) in two_option_options()
198 Opt { in two_option_options()
202 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a42", "--field"])) in two_option_options()
205 Opt { in two_option_options()
209 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "--field"])) in two_option_options()
212 Opt { in two_option_options()
216 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "--field", "f"])) in two_option_options()
219 Opt { in two_option_options()
223 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--field"])) in two_option_options()
226 Opt { in two_option_options()
230 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in two_option_options()
237 struct Opt { in optional_vec() struct
242 Opt { arg: Some(vec![1]) }, in optional_vec()
243 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "1"])) in optional_vec()
247 Opt { in optional_vec()
250 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a1", "-a2"])) in optional_vec()
254 Opt { in optional_vec()
257 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a1", "-a2", "-a"])) in optional_vec()
261 Opt { in optional_vec()
264 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a1", "-a", "-a2"])) in optional_vec()
268 Opt { in optional_vec()
271 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "1", "2"])) in optional_vec()
275 Opt { in optional_vec()
278 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "1", "2", "-a", "3"])) in optional_vec()
282 Opt { arg: Some(vec![]) }, in optional_vec()
283 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in optional_vec()
287 Opt { arg: Some(vec![]) }, in optional_vec()
288 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "-a"])) in optional_vec()
292 Opt { arg: None }, in optional_vec()
293 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in optional_vec()
300 struct Opt { in two_optional_vecs() struct
309 Opt { in two_optional_vecs()
313 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "1", "-b"])) in two_optional_vecs()
317 Opt { in two_optional_vecs()
321 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "-b", "-a1"])) in two_optional_vecs()
325 Opt { in two_optional_vecs()
329 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a1", "-a2", "-b1", "-b2"])) in two_optional_vecs()
333 Opt { arg: None, b: None }, in two_optional_vecs()
334 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in two_optional_vecs()