1
Fork 0
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:
Konstantin Pospelov 2018-01-13 22:44:37 +03:00
parent 2db220e820
commit 128a38965e
4 changed files with 88 additions and 18 deletions

View file

@ -0,0 +1,5 @@
x 1
x 2
x 3
x 5
x 8

View file

@ -0,0 +1,5 @@
1 a x
2 b x
3 c f
4 d x
5 e x

View file

@ -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");
}