fixed test

This commit is contained in:
BroodjeAap 2022-09-25 16:01:46 +00:00
parent 49fa0b97b3
commit 90ff748fa3

View file

@ -245,7 +245,7 @@ func TestFilterSubstring(t *testing.T) {
getFilterResultSubstring(
&filter,
)
if filter.Results[0] != test.Want {
if len(filter.Results) > 0 && filter.Results[0] != test.Want {
t.Errorf("Got %s, want %s", filter.Results, test.Want)
}
})