mirror of
https://github.com/uutils/coreutils
synced 2024-07-23 10:54:14 +00:00
comm: permit and test separators that contain a hyphen
This commit is contained in:
parent
dcb53b6c99
commit
1fa0b032e5
|
@ -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!()
|
||||
|
|
3
tests/fixtures/comm/ab_delimiter_hyphen_help.expected
vendored
Normal file
3
tests/fixtures/comm/ab_delimiter_hyphen_help.expected
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
a
|
||||
--helpb
|
||||
--help--helpz
|
3
tests/fixtures/comm/ab_delimiter_hyphen_one.expected
vendored
Normal file
3
tests/fixtures/comm/ab_delimiter_hyphen_one.expected
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
a
|
||||
-1b
|
||||
-1-1z
|
Loading…
Reference in a new issue