Skip to content

Commit fb297a4

Browse files
committed
Adding additional search test
1 parent 4ad5a25 commit fb297a4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmd/krew/cmd/search_test.go

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ func Test_searchByNameAndDesc(t *testing.T) {
5959
},
6060
expected: []string{"baz"},
6161
},
62+
{
63+
keyword: "",
64+
names: []string{"plugin1", "plugin2", "plugin3"}, // empty keyword, only names match
65+
descs: []string{
66+
"Description for plugin1",
67+
"Description for plugin2",
68+
"Description for plugin3",
69+
},
70+
expected: []string{"plugin1", "plugin2", "plugin3"},
71+
},
6272
}
6373

6474
for _, tp := range testPlugins {

0 commit comments

Comments
 (0)