Skip to content

Commit

Permalink
test(help): Display value terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
Aethelflaed committed Nov 14, 2024
1 parent 1706c1b commit b02bc87
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/builder/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,34 @@ Options:
utils::assert_output(cmd, "test --help", expected, false);
}

#[test]
fn display_value_terminator() {
let cmd = Command::new("test")
.author("Jaffa")
.about("Likes seeing the value terminator")
.arg(
Arg::new("cmd")
.long("cmd")
.action(ArgAction::Append)
.help("command to run")
.required(true)
.num_args(1..)
.value_terminator(";"),
);

let expected = str![[r#"
Likes seeing the value terminator
Usage: test --cmd <cmd>...
Options:
--cmd <cmd>... command to run
-h, --help Print help
"#]];
utils::assert_output(cmd, "test --help", expected, false);
}

#[test]
fn custom_headers_headers() {
let cmd = Command::new("blorp")
Expand Down

0 comments on commit b02bc87

Please sign in to comment.