MCPcopy
hub / github.com/spf13/cobra / TestCompleteNoDesCmdInFishScript

Function TestCompleteNoDesCmdInFishScript

fish_completions_test.go:26–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestCompleteNoDesCmdInFishScript(t *testing.T) {
27 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
28 child := &Command{
29 Use: "child",
30 ValidArgsFunction: validArgsFunc,
31 Run: emptyRun,
32 }
33 rootCmd.AddCommand(child)
34
35 buf := new(bytes.Buffer)
36 assertNoErr(t, rootCmd.GenFishCompletion(buf, false))
37 output := buf.String()
38
39 check(t, output, ShellCompNoDescRequestCmd)
40}
41
42func TestCompleteCmdInFishScript(t *testing.T) {
43 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}

Callers

nothing calls this directly

Calls 5

AddCommandMethod · 0.95
GenFishCompletionMethod · 0.95
checkFunction · 0.85
StringMethod · 0.80
assertNoErrFunction · 0.70

Tested by

no test coverage detected