From 9c2f594a6befca60e0e3ee3f40efb13dd637bb6d Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Mon, 12 Sep 2016 23:40:17 +0300 Subject: [PATCH] add empty match tests --- comp_test.go | 2 ++ 1 file changed, 2 insertions(+) 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"},