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

join: fix autoformat

There was an issue with autoformat when the files had a different
number of columns in the first line. This commit fixes the issue and
extends the related test to cover this case.
This commit is contained in:
Konstantin Pospelov 2018-04-15 17:42:52 +03:00
parent cd98478ce9
commit 4b8d4bfc05
3 changed files with 7 additions and 7 deletions

View file

@ -327,7 +327,7 @@ impl<'a> State<'a> {
} else {
repr.print_field(key);
repr.print_fields(&line1, self.key, self.max_fields);
repr.print_fields(&line2, other.key, self.max_fields);
repr.print_fields(&line2, other.key, other.max_fields);
}
println!();

View file

@ -1,5 +1,5 @@
1 a a
2 b b
3 c d
4 d g
5 e i
1 a a b
2 b b c
3 c d e
4 d g h
5 e i

View file

@ -1,4 +1,4 @@
1 a
1 a b
2 b c
3 d e f
4 g h