Lines Matching refs:matches
13 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set() localVariable
14 assert_eq!(matches.get_one::<String>("mammal"), None); in set()
15 assert_eq!(matches.contains_id("mammal"), false); in set()
16 assert_eq!(matches.index_of("mammal"), None); in set()
18 let matches = cmd in set() localVariable
22 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "dog"); in set()
23 assert_eq!(matches.contains_id("mammal"), true); in set()
24 assert_eq!(matches.index_of("mammal"), Some(2)); in set()
32 let matches = cmd in set() localVariable
37 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "cat"); in set()
38 assert_eq!(matches.contains_id("mammal"), true); in set()
39 assert_eq!(matches.index_of("mammal"), Some(4)); in set()
46 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in append() localVariable
47 assert_eq!(matches.get_one::<String>("mammal"), None); in append()
48 assert_eq!(matches.contains_id("mammal"), false); in append()
49 assert_eq!(matches.index_of("mammal"), None); in append()
51 let matches = cmd in append() localVariable
55 assert_eq!(matches.get_one::<String>("mammal").unwrap(), "dog"); in append()
56 assert_eq!(matches.contains_id("mammal"), true); in append()
58 matches.indices_of("mammal").unwrap().collect::<Vec<_>>(), in append()
62 let matches = cmd in append() localVariable
67 matches in append()
74 assert_eq!(matches.contains_id("mammal"), true); in append()
76 matches.indices_of("mammal").unwrap().collect::<Vec<_>>(), in append()
86 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_true() localVariable
87 assert_eq!(matches.get_flag("mammal"), false); in set_true()
88 assert_eq!(matches.contains_id("mammal"), true); in set_true()
89 assert_eq!(matches.index_of("mammal"), Some(1)); in set_true()
91 let matches = cmd in set_true() localVariable
95 assert_eq!(matches.get_flag("mammal"), true); in set_true()
96 assert_eq!(matches.contains_id("mammal"), true); in set_true()
97 assert_eq!(matches.index_of("mammal"), Some(1)); in set_true()
105 let matches = cmd in set_true() localVariable
110 assert_eq!(matches.get_flag("mammal"), true); in set_true()
111 assert_eq!(matches.contains_id("mammal"), true); in set_true()
112 assert_eq!(matches.index_of("mammal"), Some(2)); in set_true()
124 let matches = cmd in set_true_with_explicit_default_value() localVariable
128 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_explicit_default_value()
129 assert_eq!(matches.contains_id("mammal"), true); in set_true_with_explicit_default_value()
130 assert_eq!(matches.index_of("mammal"), Some(1)); in set_true_with_explicit_default_value()
132 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_true_with_explicit_default_value() localVariable
133 assert_eq!(matches.get_flag("mammal"), false); in set_true_with_explicit_default_value()
134 assert_eq!(matches.contains_id("mammal"), true); in set_true_with_explicit_default_value()
135 assert_eq!(matches.index_of("mammal"), Some(1)); in set_true_with_explicit_default_value()
149 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_true_with_default_value_if_present() localVariable
150 assert_eq!(matches.get_flag("dog"), false); in set_true_with_default_value_if_present()
151 assert_eq!(matches.get_flag("mammal"), false); in set_true_with_default_value_if_present()
153 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in set_true_with_default_value_if_present() localVariable
154 assert_eq!(matches.get_flag("dog"), true); in set_true_with_default_value_if_present()
155 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_default_value_if_present()
157 let matches = cmd in set_true_with_default_value_if_present() localVariable
161 assert_eq!(matches.get_flag("dog"), false); in set_true_with_default_value_if_present()
162 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_default_value_if_present()
176 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_true_with_default_value_if_value() localVariable
177 assert_eq!(matches.get_flag("dog"), false); in set_true_with_default_value_if_value()
178 assert_eq!(matches.get_flag("mammal"), false); in set_true_with_default_value_if_value()
180 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in set_true_with_default_value_if_value() localVariable
181 assert_eq!(matches.get_flag("dog"), true); in set_true_with_default_value_if_value()
182 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_default_value_if_value()
184 let matches = cmd in set_true_with_default_value_if_value() localVariable
188 assert_eq!(matches.get_flag("dog"), false); in set_true_with_default_value_if_value()
189 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_default_value_if_value()
203 let matches = cmd in set_true_with_required_if_eq() localVariable
207 assert_eq!(matches.get_flag("dog"), false); in set_true_with_required_if_eq()
208 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_required_if_eq()
214 let matches = cmd in set_true_with_required_if_eq() localVariable
218 assert_eq!(matches.get_flag("dog"), true); in set_true_with_required_if_eq()
219 assert_eq!(matches.get_flag("mammal"), true); in set_true_with_required_if_eq()
230 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_false() localVariable
231 assert_eq!(matches.get_flag("mammal"), true); in set_false()
232 assert_eq!(matches.contains_id("mammal"), true); in set_false()
233 assert_eq!(matches.index_of("mammal"), Some(1)); in set_false()
235 let matches = cmd in set_false() localVariable
239 assert_eq!(matches.get_flag("mammal"), false); in set_false()
240 assert_eq!(matches.contains_id("mammal"), true); in set_false()
241 assert_eq!(matches.index_of("mammal"), Some(1)); in set_false()
249 let matches = cmd in set_false() localVariable
254 assert_eq!(matches.get_flag("mammal"), false); in set_false()
255 assert_eq!(matches.contains_id("mammal"), true); in set_false()
256 assert_eq!(matches.index_of("mammal"), Some(2)); in set_false()
268 let matches = cmd in set_false_with_explicit_default_value() localVariable
272 assert_eq!(matches.get_flag("mammal"), false); in set_false_with_explicit_default_value()
273 assert_eq!(matches.contains_id("mammal"), true); in set_false_with_explicit_default_value()
274 assert_eq!(matches.index_of("mammal"), Some(1)); in set_false_with_explicit_default_value()
276 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_false_with_explicit_default_value() localVariable
277 assert_eq!(matches.get_flag("mammal"), true); in set_false_with_explicit_default_value()
278 assert_eq!(matches.contains_id("mammal"), true); in set_false_with_explicit_default_value()
279 assert_eq!(matches.index_of("mammal"), Some(1)); in set_false_with_explicit_default_value()
293 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_false_with_default_value_if_present() localVariable
294 assert_eq!(matches.get_flag("dog"), true); in set_false_with_default_value_if_present()
295 assert_eq!(matches.get_flag("mammal"), true); in set_false_with_default_value_if_present()
297 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in set_false_with_default_value_if_present() localVariable
298 assert_eq!(matches.get_flag("dog"), false); in set_false_with_default_value_if_present()
299 assert_eq!(matches.get_flag("mammal"), false); in set_false_with_default_value_if_present()
301 let matches = cmd in set_false_with_default_value_if_present() localVariable
305 assert_eq!(matches.get_flag("dog"), true); in set_false_with_default_value_if_present()
306 assert_eq!(matches.get_flag("mammal"), false); in set_false_with_default_value_if_present()
320 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in set_false_with_default_value_if_value() localVariable
321 assert_eq!(matches.get_flag("dog"), true); in set_false_with_default_value_if_value()
322 assert_eq!(matches.get_flag("mammal"), true); in set_false_with_default_value_if_value()
324 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in set_false_with_default_value_if_value() localVariable
325 assert_eq!(matches.get_flag("dog"), false); in set_false_with_default_value_if_value()
326 assert_eq!(matches.get_flag("mammal"), false); in set_false_with_default_value_if_value()
328 let matches = cmd in set_false_with_default_value_if_value() localVariable
332 assert_eq!(matches.get_flag("dog"), true); in set_false_with_default_value_if_value()
333 assert_eq!(matches.get_flag("mammal"), false); in set_false_with_default_value_if_value()
340 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in count() localVariable
341 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 0); in count()
342 assert_eq!(matches.contains_id("mammal"), true); in count()
343 assert_eq!(matches.index_of("mammal"), Some(1)); in count()
345 let matches = cmd in count() localVariable
349 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 1); in count()
350 assert_eq!(matches.contains_id("mammal"), true); in count()
351 assert_eq!(matches.index_of("mammal"), Some(1)); in count()
353 let matches = cmd in count() localVariable
357 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 2); in count()
358 assert_eq!(matches.contains_id("mammal"), true); in count()
359 assert_eq!(matches.index_of("mammal"), Some(2)); in count()
371 let matches = cmd in count_with_explicit_default_value() localVariable
375 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 1); in count_with_explicit_default_value()
376 assert_eq!(matches.contains_id("mammal"), true); in count_with_explicit_default_value()
377 assert_eq!(matches.index_of("mammal"), Some(1)); in count_with_explicit_default_value()
379 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in count_with_explicit_default_value() localVariable
380 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 10); in count_with_explicit_default_value()
381 assert_eq!(matches.contains_id("mammal"), true); in count_with_explicit_default_value()
382 assert_eq!(matches.index_of("mammal"), Some(1)); in count_with_explicit_default_value()
396 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in count_with_default_value_if_present() localVariable
397 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 0); in count_with_default_value_if_present()
398 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 0); in count_with_default_value_if_present()
400 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in count_with_default_value_if_present() localVariable
401 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 1); in count_with_default_value_if_present()
402 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 10); in count_with_default_value_if_present()
404 let matches = cmd in count_with_default_value_if_present() localVariable
408 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 0); in count_with_default_value_if_present()
409 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 1); in count_with_default_value_if_present()
423 let matches = cmd.clone().try_get_matches_from(["test"]).unwrap(); in count_with_default_value_if_value() localVariable
424 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 0); in count_with_default_value_if_value()
425 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 0); in count_with_default_value_if_value()
427 let matches = cmd.clone().try_get_matches_from(["test", "--dog"]).unwrap(); in count_with_default_value_if_value() localVariable
428 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 1); in count_with_default_value_if_value()
429 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 0); in count_with_default_value_if_value()
431 let matches = cmd in count_with_default_value_if_value() localVariable
435 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 2); in count_with_default_value_if_value()
436 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 10); in count_with_default_value_if_value()
438 let matches = cmd in count_with_default_value_if_value() localVariable
442 assert_eq!(*matches.get_one::<u8>("dog").unwrap(), 0); in count_with_default_value_if_value()
443 assert_eq!(*matches.get_one::<u8>("mammal").unwrap(), 1); in count_with_default_value_if_value()