MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestSearchCmd_CommandStructure

Function TestSearchCmd_CommandStructure

cmds/cmd_search_test.go:16–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestSearchCmd_CommandStructure(t *testing.T) {
17 // Cleanup.
18 dirs.RemoveAllForTest()
19
20 // Test command creation
21 search := &searchCmd{}
22 celer := &configs.Celer{}
23
24 cmd := search.Command(celer)
25 if cmd.Use != "search" {
26 t.Errorf("Expected Use to be 'search', got %s", cmd.Use)
27 }
28
29 if cmd.Short == "" {
30 t.Error("Short description should not be empty")
31 }
32
33 if cmd.Long == "" {
34 t.Error("Long description should not be empty")
35 }
36
37 // Test Args validation - should require exactly 1 argument.
38 if cmd.Args == nil {
39 t.Error("Args validation should be set")
40 }
41}
42
43func TestSearchCmd_Search_ExactMatch(t *testing.T) {
44 // Cleanup.

Callers

nothing calls this directly

Calls 3

CommandMethod · 0.95
RemoveAllForTestFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected