Skip to content

Commit 3f5c05c

Browse files
committed
test(parser): Ensure we are actually testing ignore_errors
1 parent ba4745d commit 3f5c05c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/builder/ignore_errors.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use super::utils;
55
#[test]
66
fn single_short_arg_without_value() {
77
let cmd = Command::new("cmd").ignore_errors(true).arg(arg!(
8-
-c --config [FILE] "Sets a custom config file"
8+
-c --config <FILE> "Sets a custom config file"
99
));
1010

1111
let r = cmd.try_get_matches_from(vec!["cmd", "-c" /* missing: , "config file" */]);
@@ -18,7 +18,7 @@ fn single_short_arg_without_value() {
1818
#[test]
1919
fn single_long_arg_without_value() {
2020
let cmd = Command::new("cmd").ignore_errors(true).arg(arg!(
21-
-c --config [FILE] "Sets a custom config file"
21+
-c --config <FILE> "Sets a custom config file"
2222
));
2323

2424
let r = cmd.try_get_matches_from(vec!["cmd", "--config" /* missing: , "config file" */]);
@@ -33,10 +33,10 @@ fn multiple_args_and_final_arg_without_value() {
3333
let cmd = Command::new("cmd")
3434
.ignore_errors(true)
3535
.arg(arg!(
36-
-c --config [FILE] "Sets a custom config file"
36+
-c --config <FILE> "Sets a custom config file"
3737
))
3838
.arg(arg!(
39-
-x --stuff [FILE] "Sets a custom stuff file"
39+
-x --stuff <FILE> "Sets a custom stuff file"
4040
))
4141
.arg(arg!(f: -f "Flag").action(ArgAction::SetTrue));
4242

@@ -59,10 +59,10 @@ fn multiple_args_and_intermittent_arg_without_value() {
5959
let cmd = Command::new("cmd")
6060
.ignore_errors(true)
6161
.arg(arg!(
62-
-c --config[FILE] "Sets a custom config file"
62+
-c --config <FILE> "Sets a custom config file"
6363
))
6464
.arg(arg!(
65-
-x --stuff[FILE] "Sets a custom stuff file"
65+
-x --stuff <FILE> "Sets a custom stuff file"
6666
))
6767
.arg(arg!(f: -f "Flag").action(ArgAction::SetTrue));
6868

0 commit comments

Comments
 (0)