mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
comm: permit and test separators that contain a hyphen
This commit is contained in:
@@ -186,6 +186,7 @@ pub fn uu_app() -> Command {
|
||||
.help("separate columns with STR")
|
||||
.value_name("STR")
|
||||
.default_value(options::DELIMITER_DEFAULT)
|
||||
.allow_hyphen_values(true)
|
||||
.hide_default_value(true),
|
||||
)
|
||||
.arg(
|
||||
|
||||
@@ -91,6 +91,22 @@ fn output_delimiter() {
|
||||
.stdout_only_fixture("ab_delimiter_word.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_delimiter_hyphen_one() {
|
||||
new_ucmd!()
|
||||
.args(&["--output-delimiter", "-1", "a", "b"])
|
||||
.succeeds()
|
||||
.stdout_only_fixture("ab_delimiter_hyphen_one.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_delimiter_hyphen_help() {
|
||||
new_ucmd!()
|
||||
.args(&["--output-delimiter", "--help", "a", "b"])
|
||||
.succeeds()
|
||||
.stdout_only_fixture("ab_delimiter_hyphen_help.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_delimiter_nul() {
|
||||
new_ucmd!()
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
a
|
||||
--helpb
|
||||
--help--helpz
|
||||
@@ -0,0 +1,3 @@
|
||||
a
|
||||
-1b
|
||||
-1-1z
|
||||
Reference in New Issue
Block a user