From fb297a4038b4242947835a72baa19b18ef25b0e3 Mon Sep 17 00:00:00 2001 From: wallentx Date: Tue, 1 Oct 2024 04:45:56 -0500 Subject: [PATCH] Adding additional search test --- cmd/krew/cmd/search_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/krew/cmd/search_test.go b/cmd/krew/cmd/search_test.go index 00797c92..71e2aab5 100644 --- a/cmd/krew/cmd/search_test.go +++ b/cmd/krew/cmd/search_test.go @@ -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 {