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

Function TestReverseCmd_Completion

cmds/cmd_reverse_test.go:42–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestReverseCmd_Completion(t *testing.T) {
43 // Cleanup.
44 dirs.RemoveAllForTest()
45
46 cmd := reverseCmd{}
47 suggestions, directive := cmd.completion(nil, []string{}, "test")
48
49 // Should return no file completion directive (cobra.ShellCompDirectiveNoFileComp)
50 // Note: The actual value might differ, so we just check it's a valid directive
51 if directive < 0 {
52 t.Errorf("expected valid completion directive, got %d", directive)
53 }
54
55 // Suggestions might be empty if no ports exist
56 if suggestions == nil {
57 t.Error("expected non-nil suggestions slice")
58 }
59}
60
61func TestReverseCmd_ValidatePackageName(t *testing.T) {
62 // Cleanup.

Callers

nothing calls this directly

Calls 3

completionMethod · 0.95
RemoveAllForTestFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected