Lines Matching refs:new

9     let result = Command::new("flag_required")
20 let m = Command::new("flag_required")
35 let result = Command::new("option_required")
46 let m = Command::new("option_required")
62 let result = Command::new("positional_required")
63 .arg(Arg::new("flag").index(1).required(true))
72 let m = Command::new("positional_required")
73 .arg(Arg::new("flag").index(1).required(true))
96 let cmd = Command::new("positional_required")
97 .arg(Arg::new("flag").required(true).requires("opt"))
98 .arg(Arg::new("opt"))
99 .arg(Arg::new("bar"));
116 let cmd = Command::new("positional_required")
117 .arg(Arg::new("flag").required(true).requires_if("val", "opt"))
118 .arg(Arg::new("opt"))
119 .arg(Arg::new("bar"));
137 let cmd = Command::new("positional_required")
138 .arg(Arg::new("flag").required(true).requires_if("val", "opt"))
139 .arg(Arg::new("foo").required(true))
140 .arg(Arg::new("opt"))
141 .arg(Arg::new("bar"));
148 let result = Command::new("group_required")
150 .group(ArgGroup::new("gr").required(true).arg("some").arg("other"))
161 let m = Command::new("group_required")
163 .group(ArgGroup::new("gr").required(true).arg("some").arg("other"))
175 let m = Command::new("group_required")
177 .group(ArgGroup::new("gr").required(true).arg("some").arg("other"))
189 let result = Command::new("arg_require_group")
191 .group(ArgGroup::new("gr").arg("some").arg("other"))
202 let res = Command::new("arg_require_group")
208 .group(ArgGroup::new("gr").arg("some").arg("other"))
221 let res = Command::new("arg_require_group")
227 .group(ArgGroup::new("gr").arg("some").arg("other"))
242 let m = Command::new("test")
265 let res = Command::new("unlesstest")
267 Arg::new("cfg")
272 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
283 let res = Command::new("unlesstest")
285 Arg::new("cfg")
290 .arg(Arg::new("dbg").long("debug"))
299 let res = Command::new("unlesstest")
300 .arg(Arg::new("opt").long("opt").num_args(0..=1))
302 Arg::new("cfg")
307 .arg(Arg::new("dbg").long("debug"))
318 let res = Command::new("unlessall")
320 Arg::new("cfg")
325 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
326 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
338 let res = Command::new("unlessall")
340 Arg::new("cfg")
345 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
346 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
357 let res = Command::new("unlessone")
359 Arg::new("cfg")
364 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
365 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
378 let res = Command::new("unlessone")
380 Arg::new("cfg")
385 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
386 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
398 let res = Command::new("unlessone")
400 Arg::new("a")
405 .arg(Arg::new("b").short('b').action(ArgAction::SetTrue))
407 Arg::new("x")
419 let res = Command::new("unlessone")
421 Arg::new("a")
426 .arg(Arg::new("b").short('b').action(ArgAction::SetTrue))
428 Arg::new("x")
440 let res = Command::new("unlessone")
442 Arg::new("a")
447 .arg(Arg::new("b").short('b').action(ArgAction::SetTrue))
448 .arg(Arg::new("x").required_unless_present_any(["a", "b"]))
456 let res = Command::new("unlessone")
458 Arg::new("a")
463 .arg(Arg::new("b").short('b').action(ArgAction::SetTrue))
465 Arg::new("x")
477 let res = Command::new("unlessone")
479 Arg::new("cfg")
484 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
485 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
497 let res = Command::new("unlessone")
499 Arg::new("cfg")
504 .arg(Arg::new("dbg").long("debug").action(ArgAction::SetTrue))
505 .arg(Arg::new("infile").short('i').action(ArgAction::Set))
533 let res = Command::new("unlessone")
535 Arg::new("cfg")
540 .arg(Arg::new("extra").long("extra").action(ArgAction::SetTrue))
549 let res = Command::new("unlessone")
551 Arg::new("cfg")
556 .arg(Arg::new("extra").long("extra").action(ArgAction::SetTrue))
557 .arg(Arg::new("other").long("other").action(ArgAction::SetTrue))
566 let res = Command::new("unlessone")
568 Arg::new("cfg")
573 .arg(Arg::new("extra").long("extra").action(ArgAction::SetTrue))
574 .arg(Arg::new("other").long("other").action(ArgAction::SetTrue))
582 let res = Command::new("unlessone")
584 Arg::new("cfg")
589 .arg(Arg::new("extra").long("extra").action(ArgAction::SetTrue))
599 let res = Command::new("ri")
601 Arg::new("cfg")
606 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
614 let res = Command::new("ri")
616 Arg::new("cfg")
621 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
630 let res = Command::new("ri")
632 Arg::new("cfg")
638 Arg::new("extra")
650 let res = Command::new("ri")
652 Arg::new("cfg")
658 Arg::new("extra")
671 let res = Command::new("ri")
673 Arg::new("cfg")
678 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
679 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
689 let res = Command::new("ri")
691 Arg::new("cfg")
696 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
697 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
705 let res = Command::new("ri")
707 Arg::new("cfg")
712 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
713 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
722 let res = Command::new("ri")
724 Arg::new("cfg")
730 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
731 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
741 let res = Command::new("ri")
743 Arg::new("cfg")
749 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
750 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
769 let cmd = Command::new("Test cmd")
774 Arg::new("target")
781 Arg::new("input")
787 Arg::new("output")
813 let cmd = Command::new("Test cmd")
818 Arg::new("target")
825 Arg::new("input")
831 Arg::new("output")
847 let res = Command::new("ri")
849 Arg::new("cfg")
854 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
862 let res = Command::new("ri")
864 Arg::new("cfg")
869 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
870 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
878 let res = Command::new("ri")
880 Arg::new("cfg")
885 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
886 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
895 let res = Command::new("ri")
897 Arg::new("cfg")
902 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
903 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
911 let res = Command::new("ri")
913 Arg::new("cfg")
918 .arg(Arg::new("extra").action(ArgAction::Set).long("extra"))
919 .arg(Arg::new("option").action(ArgAction::Set).long("option"))
938 let cmd = Command::new("clap-test").version("v1.4.8").arg(
939 Arg::new("opt")
962 let cmd = Command::new("clap-test")
965 Arg::new("opt")
974 Arg::new("foo")
997 let cmd = Command::new("clap-test")
1000 Arg::new("opt")
1009 Arg::new("foo")
1018 Arg::new("g1")
1024 Arg::new("g2")
1030 ArgGroup::new("test_group")
1043 Command::new("example")
1076 let cmd = Command::new("test")
1078 Arg::new("a")
1085 Arg::new("b")
1092 Arg::new("c")
1099 Arg::new("d")
1138 let cmd = Command::new("test")
1140 Arg::new("relation_id")
1148 Arg::new("remote_unit_name")
1162 let m = Command::new("foo")
1164 Arg::new("check")
1169 .arg(Arg::new("unique").short('u').action(ArgAction::SetTrue))
1178 let matches = Command::new("foo")
1180 Arg::new("check")
1188 Arg::new("unique")
1203 let cmd = Command::new("prog")
1204 .arg(Arg::new("foo").long("foo").action(ArgAction::SetTrue))
1205 .arg(Arg::new("bar").long("bar").action(ArgAction::SetTrue))
1206 .arg(Arg::new("baz").long("baz").action(ArgAction::SetTrue))
1208 Arg::new("flag")
1238 let _ = Command::new("prog")
1239 .arg(Arg::new("config").requires("extra").long("config"))
1247 let _ = Command::new("prog")
1249 Arg::new("config")
1260 let _ = Command::new("prog")
1262 Arg::new("config")
1273 let _ = Command::new("prog")
1275 Arg::new("config")
1284 let result = Command::new("prog")
1286 Arg::new("opt")
1291 .arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue))
1310 let result = Command::new("prog")
1312 Arg::new("opt")
1317 .arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue))
1336 let result = Command::new("prog")
1337 .arg(Arg::new("opt").long("opt").default_value("default"))
1338 .arg(Arg::new("flag").long("flag").action(ArgAction::SetTrue))
1339 .group(ArgGroup::new("one").arg("opt").requires("flag"))
1358 let result = Command::new("prog")
1359 .arg(Arg::new("opt").long("opt").default_value("default"))
1361 Arg::new("flag")
1384 let result = Command::new("prog")
1385 .arg(Arg::new("opt").long("opt").default_value("default"))
1387 Arg::new("flag")
1410 let result = Command::new("prog")
1411 .arg(Arg::new("opt").long("opt").default_value("default"))
1412 .arg(Arg::new("flag").long("flag").required_unless_present("opt"))
1420 let result = Command::new("prog")
1421 .arg(Arg::new("opt").long("opt").default_value("default"))
1423 Arg::new("flag")
1435 let cmd = Command::new("Clap-created-USAGE-string-bug")
1436 .arg(Arg::new("a").required(true))
1438 Arg::new("b")
1444 Arg::new("c")
1462 let cmd = Command::new("test")
1467 ArgGroup::new("either_or_both")