mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07: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:
+1
-1
@@ -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!();
|
||||
|
||||
+5
-5
@@ -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
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
1 a
|
||||
1 a b
|
||||
2 b c
|
||||
3 d e f
|
||||
4 g h
|
||||
|
||||
Reference in New Issue
Block a user