diff --git a/comp_test.go b/comp_test.go index f7a6feb..531a30e 100644 --- a/comp_test.go +++ b/comp_test.go @@ -34,6 +34,8 @@ func TestMatchWord(t *testing.T) { matches []string longest string }{ + {"", nil, nil, ""}, + {"", []string{"foo", "bar", "baz"}, []string{"foo", "bar", "baz"}, ""}, {"fo", []string{"foo", "bar", "baz"}, []string{"foo"}, "foo "}, {"ba", []string{"foo", "bar", "baz"}, []string{"bar", "baz"}, "ba"}, {"fo", []string{"bar", "baz"}, nil, "fo"},