1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

join: implement basic functionality

The basic implementation of join with some tests. The supported
options: -1, -2, -j, -a, -i.
This commit is contained in:
Konstantin Pospelov 2017-12-14 00:02:42 +03:00
parent 372dda9dfa
commit b33ce67d91
19 changed files with 560 additions and 0 deletions

4
tests/fixtures/join/capitalized.txt vendored Normal file
View file

@ -0,0 +1,4 @@
A 1
B 2
C 4
D 8

View file

@ -0,0 +1,3 @@
A 1 2 f
B 2 3 g
C 4 4 h

5
tests/fixtures/join/default.expected vendored Normal file
View file

@ -0,0 +1,5 @@
1 a
2 b
3 c
5 e
8 h

View file

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

View file

@ -0,0 +1,5 @@
c 3 2 1 cd
d 4 3 2 de
e 5 5 3 ef
f 6 7 4 fg
g 7 11 5 gh

0
tests/fixtures/join/empty.txt vendored Normal file
View file

5
tests/fixtures/join/fields_1.txt vendored Normal file
View file

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

9
tests/fixtures/join/fields_2.txt vendored Normal file
View file

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

6
tests/fixtures/join/fields_3.txt vendored Normal file
View file

@ -0,0 +1,6 @@
a 2 f
b 3 g
c 4 h
f 5 i
g 6 j
h 7 k

5
tests/fixtures/join/fields_4.txt vendored Normal file
View file

@ -0,0 +1,5 @@
2 c 1 cd
3 d 2 de
5 e 3 ef
7 f 4 fg
11 g 5 gh

View file

@ -0,0 +1,9 @@
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