1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-28 09:08:41 +02:00

fix specs

This commit is contained in:
Jesse Duffield 2020-02-14 23:45:38 +11:00
parent 5b9996b16f
commit 2e1344f611
2 changed files with 4 additions and 1 deletions

View File

@ -174,6 +174,9 @@ func getPadWidths(stringArrays [][]string) []int {
maxWidth = len(stringArray) maxWidth = len(stringArray)
} }
} }
if maxWidth-1 < 0 {
return []int{}
}
padWidths := make([]int, maxWidth-1) padWidths := make([]int, maxWidth-1)
for i := range padWidths { for i := range padWidths {
for _, strings := range stringArrays { for _, strings := range stringArrays {

View File

@ -276,8 +276,8 @@ func TestRenderDisplayableList(t *testing.T) {
Displayable(&myDisplayable{[]string{"b", "c"}}), Displayable(&myDisplayable{[]string{"b", "c"}}),
}, },
false, false,
"a \nb c",
"", "",
"Each item must return the same number of strings to display",
}, },
{ {
[]Displayable{ []Displayable{