mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
join: support custom empty filler
This commit is contained in:
parent
2db220e820
commit
128a38965e
4 changed files with 88 additions and 18 deletions
5
tests/fixtures/join/empty_key.expected
vendored
Normal file
5
tests/fixtures/join/empty_key.expected
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
x 1
|
||||
x 2
|
||||
x 3
|
||||
x 5
|
||||
x 8
|
5
tests/fixtures/join/missing_format_fields.expected
vendored
Normal file
5
tests/fixtures/join/missing_format_fields.expected
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
1 a x
|
||||
2 b x
|
||||
3 c f
|
||||
4 d x
|
||||
5 e x
|
|
@ -173,3 +173,29 @@ fn empty_format() {
|
|||
.arg("")
|
||||
.fails().stderr_is("join: error: invalid file number in field spec: ''");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_key() {
|
||||
new_ucmd!()
|
||||
.arg("fields_1.txt")
|
||||
.arg("empty.txt")
|
||||
.arg("-j")
|
||||
.arg("2")
|
||||
.arg("-a")
|
||||
.arg("1")
|
||||
.arg("-e")
|
||||
.arg("x")
|
||||
.succeeds().stdout_only_fixture("empty_key.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn missing_format_fields() {
|
||||
new_ucmd!()
|
||||
.arg("fields_2.txt")
|
||||
.arg("different_lengths.txt")
|
||||
.arg("-o")
|
||||
.arg("0 1.2 2.4")
|
||||
.arg("-e")
|
||||
.arg("x")
|
||||
.succeeds().stdout_only_fixture("missing_format_fields.expected");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue