Lines Matching defs:cmd

111     let cmd = Command::new("dym").subcommand(Command::new("subcmd"));
112 utils::assert_output(cmd, "dym subcm", DYM_SUBCMD, true);
131 let cmd = Command::new("dym")
134 utils::assert_output(cmd, "dym te", DYM_SUBCMD_AMBIGUOUS, true);
151 let cmd = Command::new("dym")
154 utils::assert_output(cmd, "dym --subcmarg subcmd", EXPECTED, true);
169 let cmd = Command::new("dym")
172 utils::assert_output(cmd, "dym --subcmarg foo", EXPECTED, true);
198 let cmd = Command::new("clap-test").version("2.6").subcommand(
205 utils::assert_output(cmd, "clap-test --help", VISIBLE_ALIAS_HELP, false);
222 let cmd = Command::new("clap-test")
225 utils::assert_output(cmd, "clap-test --help", INVISIBLE_ALIAS_HELP, false);
335 let mut cmd = Command::new("myprog")
341 &cmd.render_usage().to_string(),
345 let help_text = cmd.render_help().to_string();
358 Usage: cmd [COMMAND]
363 let cmd = Command::new("cmd").subcommand(Command::new("subcmd"));
365 utils::assert_output(cmd, "cmd -- subcmd", SUBCMD_AFTER_DOUBLE_DASH, true);
398 let cmd = Command::new("opt")
402 let m = cmd
409 let m = cmd
416 let m = cmd.try_get_matches_from(["opt", "global"]).unwrap();
424 let cmd = Command::new("fake")
429 cmd,
446 let cmd = Command::new("busybox")
451 let m = cmd
458 let m = cmd.clone().try_get_matches_from(["true"]).unwrap();
461 let m = cmd.clone().try_get_matches_from(["a.out"]);
468 let mut cmd = Command::new("hostname")
473 let m = cmd.clone().try_get_matches_from(["hostname"]).unwrap();
476 let m = cmd.clone().try_get_matches_from(["dnsdomainname"]).unwrap();
479 let m = cmd.clone().try_get_matches_from(["a.out"]);
483 let m = cmd.try_get_matches_from_mut(["hostname", "hostname"]);
487 let m = cmd.try_get_matches_from(["hostname", "dnsdomainname"]);
495 let cmd = Command::new("repl")
502 let err = cmd.clone().try_get_matches_from(["world"]).unwrap_err();
515 let err = cmd.clone().try_get_matches_from(["baz"]).unwrap_err();
532 let err = cmd
538 let err = cmd
548 let mut cmd = Command::new("repl")
555 cmd.build();
570 let cmd = Command::new("repl")
575 utils::assert_output(cmd, "foo bar --help", EXPECTED, false);
590 let cmd = Command::new("repl")
595 utils::assert_output(cmd, "help foo bar", EXPECTED, false);
610 let mut cmd = Command::new("repl")
615 cmd.build();
616 let subcmd = cmd.find_subcommand_mut("foo").unwrap();