mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27: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:
parent
372dda9dfa
commit
b33ce67d91
19 changed files with 560 additions and 0 deletions
4
tests/fixtures/join/capitalized.txt
vendored
Normal file
4
tests/fixtures/join/capitalized.txt
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
A 1
|
||||
B 2
|
||||
C 4
|
||||
D 8
|
3
tests/fixtures/join/case_insensitive.expected
vendored
Normal file
3
tests/fixtures/join/case_insensitive.expected
vendored
Normal 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
5
tests/fixtures/join/default.expected
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
1 a
|
||||
2 b
|
||||
3 c
|
||||
5 e
|
||||
8 h
|
6
tests/fixtures/join/different_field.expected
vendored
Normal file
6
tests/fixtures/join/different_field.expected
vendored
Normal 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
|
5
tests/fixtures/join/different_fields.expected
vendored
Normal file
5
tests/fixtures/join/different_fields.expected
vendored
Normal 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
0
tests/fixtures/join/empty.txt
vendored
Normal file
5
tests/fixtures/join/fields_1.txt
vendored
Normal file
5
tests/fixtures/join/fields_1.txt
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
1
|
||||
2
|
||||
3
|
||||
5
|
||||
8
|
9
tests/fixtures/join/fields_2.txt
vendored
Normal file
9
tests/fixtures/join/fields_2.txt
vendored
Normal 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
6
tests/fixtures/join/fields_3.txt
vendored
Normal 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
5
tests/fixtures/join/fields_4.txt
vendored
Normal 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
|
9
tests/fixtures/join/unpaired_lines.expected
vendored
Normal file
9
tests/fixtures/join/unpaired_lines.expected
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue