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:
commit
f9559fea80
6 changed files with 65 additions and 12 deletions
|
@ -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]
|
||||
|
|
1
tests/fixtures/join/fields_3.txt
vendored
1
tests/fixtures/join/fields_3.txt
vendored
|
@ -4,3 +4,4 @@ c 4 h
|
|||
f 5 i
|
||||
g 6 j
|
||||
h 7 k
|
||||
i 99 l
|
||||
|
|
4
tests/fixtures/join/suppress_joined_outer.expected
vendored
Normal file
4
tests/fixtures/join/suppress_joined_outer.expected
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
1 a
|
||||
8 h
|
||||
9 i
|
||||
99 i l
|
|
@ -4,3 +4,4 @@
|
|||
i 5 f
|
||||
j 6 g
|
||||
k 7 h
|
||||
l 99 i
|
||||
|
|
10
tests/fixtures/join/unpaired_lines_outer.expected
vendored
Normal file
10
tests/fixtures/join/unpaired_lines_outer.expected
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue