This commit is contained in:
Patrick Marks 2020-05-15 08:25:01 -07:00
parent 97e3d8c0ac
commit cb425946b7

View file

@ -529,20 +529,20 @@ fn list_correct_required_args() {
.author("F0x06") .author("F0x06")
.about("Arg test") .about("Arg test")
.arg( .arg(
Arg::with_name("target") Arg::new("target")
.takes_value(true) .takes_value(true)
.required(true) .required(true)
.possible_values(&["file", "stdout"]) .possible_values(&["file", "stdout"])
.long("target"), .long("target"),
) )
.arg( .arg(
Arg::with_name("input") Arg::new("input")
.takes_value(true) .takes_value(true)
.required(true) .required(true)
.long("input"), .long("input"),
) )
.arg( .arg(
Arg::with_name("output") Arg::new("output")
.takes_value(true) .takes_value(true)
.required(true) .required(true)
.long("output"), .long("output"),
@ -695,7 +695,7 @@ fn require_eq_filtered() {
let app = App::new("clap-test") let app = App::new("clap-test")
.version("v1.4.8") .version("v1.4.8")
.arg( .arg(
Arg::with_name("opt") Arg::new("opt")
.long("opt") .long("opt")
.short('o') .short('o')
.required(true) .required(true)
@ -704,7 +704,7 @@ fn require_eq_filtered() {
.about("some"), .about("some"),
) )
.arg( .arg(
Arg::with_name("foo") Arg::new("foo")
.long("foo") .long("foo")
.short('f') .short('f')
.required(true) .required(true)
@ -725,7 +725,7 @@ fn require_eq_filtered_group() {
let app = App::new("clap-test") let app = App::new("clap-test")
.version("v1.4.8") .version("v1.4.8")
.arg( .arg(
Arg::with_name("opt") Arg::new("opt")
.long("opt") .long("opt")
.short('o') .short('o')
.required(true) .required(true)
@ -734,7 +734,7 @@ fn require_eq_filtered_group() {
.about("some"), .about("some"),
) )
.arg( .arg(
Arg::with_name("foo") Arg::new("foo")
.long("foo") .long("foo")
.short('f') .short('f')
.required(true) .required(true)
@ -743,19 +743,19 @@ fn require_eq_filtered_group() {
.about("some other arg"), .about("some other arg"),
) )
.arg( .arg(
Arg::with_name("g1") Arg::new("g1")
.long("g1") .long("g1")
.require_equals(true) .require_equals(true)
.value_name("FILE"), .value_name("FILE"),
) )
.arg( .arg(
Arg::with_name("g2") Arg::new("g2")
.long("g2") .long("g2")
.require_equals(true) .require_equals(true)
.value_name("FILE"), .value_name("FILE"),
) )
.group( .group(
ArgGroup::with_name("test_group") ArgGroup::new("test_group")
.args(&["g1", "g2"]) .args(&["g1", "g2"])
.required(true), .required(true),
); );