Skip to content

Commit

Permalink
Adding additional search test
Browse files Browse the repository at this point in the history
  • Loading branch information
wallentx committed Oct 1, 2024
1 parent 4ad5a25 commit fb297a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/krew/cmd/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ func Test_searchByNameAndDesc(t *testing.T) {
},
expected: []string{"baz"},
},
{
keyword: "",
names: []string{"plugin1", "plugin2", "plugin3"}, // empty keyword, only names match
descs: []string{
"Description for plugin1",
"Description for plugin2",
"Description for plugin3",
},
expected: []string{"plugin1", "plugin2", "plugin3"},
},
}

for _, tp := range testPlugins {
Expand Down

0 comments on commit fb297a4

Please sign in to comment.