1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

fix another issue with indentation

This commit is contained in:
Jesse Duffield
2021-10-24 16:26:03 +11:00
parent 7d9461877a
commit 6457800748
4 changed files with 44 additions and 29 deletions

View File

@ -56,11 +56,11 @@ func TestGetPaddedDisplayStrings(t *testing.T) {
// TestGetPadWidths is a function.
func TestGetPadWidths(t *testing.T) {
type scenario struct {
stringArrays [][]string
expected []int
input [][]string
expected []int
}
scenarios := []scenario{
tests := []scenario{
{
[][]string{{""}, {""}},
[]int{},
@ -73,9 +73,16 @@ func TestGetPadWidths(t *testing.T) {
[][]string{{"aa", "b", "ccc"}, {"c", "d", "e"}},
[]int{2, 1},
},
{
[][]string{{"AŁ", "b", "ccc"}, {"c", "d", "e"}},
[]int{2, 1},
},
}
for _, s := range scenarios {
assert.EqualValues(t, s.expected, getPadWidths(s.stringArrays))
for _, test := range tests {
output := getPadWidths(test.input)
if !assert.EqualValues(t, output, test.expected) {
t.Errorf("getPadWidths(%v) = %v, want %v", test.input, output, test.expected)
}
}
}