add empty match tests
This commit is contained in:
parent
a2c7656301
commit
9c2f594a6b
@ -34,6 +34,8 @@ func TestMatchWord(t *testing.T) {
|
|||||||
matches []string
|
matches []string
|
||||||
longest string
|
longest string
|
||||||
}{
|
}{
|
||||||
|
{"", nil, nil, ""},
|
||||||
|
{"", []string{"foo", "bar", "baz"}, []string{"foo", "bar", "baz"}, ""},
|
||||||
{"fo", []string{"foo", "bar", "baz"}, []string{"foo"}, "foo "},
|
{"fo", []string{"foo", "bar", "baz"}, []string{"foo"}, "foo "},
|
||||||
{"ba", []string{"foo", "bar", "baz"}, []string{"bar", "baz"}, "ba"},
|
{"ba", []string{"foo", "bar", "baz"}, []string{"bar", "baz"}, "ba"},
|
||||||
{"fo", []string{"bar", "baz"}, nil, "fo"},
|
{"fo", []string{"bar", "baz"}, nil, "fo"},
|
||||||
|
Loading…
Reference in New Issue
Block a user