1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 05:57:46 +00:00

Merge pull request #2569 from jtracey/master

join: add support for full outer joins
This commit is contained in:
Terts Diepraam 2021-08-13 14:38:15 +02:00 committed by GitHub
commit f9559fea80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 12 deletions

View file

@ -94,6 +94,18 @@ fn unpaired_lines() {
.arg("2")
.succeeds()
.stdout_only_fixture("unpaired_lines.expected");
new_ucmd!()
.arg("fields_3.txt")
.arg("fields_2.txt")
.arg("-1")
.arg("2")
.arg("-a")
.arg("1")
.arg("-a")
.arg("2")
.succeeds()
.stdout_only_fixture("unpaired_lines_outer.expected");
}
#[test]
@ -107,6 +119,18 @@ fn suppress_joined() {
.arg("2")
.succeeds()
.stdout_only_fixture("suppress_joined.expected");
new_ucmd!()
.arg("fields_3.txt")
.arg("fields_2.txt")
.arg("-1")
.arg("2")
.arg("-a")
.arg("1")
.arg("-v")
.arg("2")
.succeeds()
.stdout_only_fixture("suppress_joined_outer.expected");
}
#[test]

View file

@ -4,3 +4,4 @@ c 4 h
f 5 i
g 6 j
h 7 k
i 99 l

View file

@ -0,0 +1,4 @@
1 a
8 h
9 i
99 i l

View file

@ -4,3 +4,4 @@
i 5 f
j 6 g
k 7 h
l 99 i

View file

@ -0,0 +1,10 @@
1 a
2 a f b
3 b g c
4 c h d
5 f i e
6 g j f
7 h k g
8 h
9 i
99 i l