Skip to content

Commit b02bc87

Browse files
committed
test(help): Display value terminator
1 parent 1706c1b commit b02bc87

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/builder/help.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,6 +2064,34 @@ Options:
20642064
utils::assert_output(cmd, "test --help", expected, false);
20652065
}
20662066

2067+
#[test]
2068+
fn display_value_terminator() {
2069+
let cmd = Command::new("test")
2070+
.author("Jaffa")
2071+
.about("Likes seeing the value terminator")
2072+
.arg(
2073+
Arg::new("cmd")
2074+
.long("cmd")
2075+
.action(ArgAction::Append)
2076+
.help("command to run")
2077+
.required(true)
2078+
.num_args(1..)
2079+
.value_terminator(";"),
2080+
);
2081+
2082+
let expected = str![[r#"
2083+
Likes seeing the value terminator
2084+
2085+
Usage: test --cmd <cmd>...
2086+
2087+
Options:
2088+
--cmd <cmd>... command to run
2089+
-h, --help Print help
2090+
2091+
"#]];
2092+
utils::assert_output(cmd, "test --help", expected, false);
2093+
}
2094+
20672095
#[test]
20682096
fn custom_headers_headers() {
20692097
let cmd = Command::new("blorp")

0 commit comments

Comments
 (0)