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

Function TestCompleteNoDesCmdInZshScript

completions_test.go:1591–1605  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1589}
1590
1591func TestCompleteNoDesCmdInZshScript(t *testing.T) {
1592 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}
1593 child := &Command{
1594 Use: "child",
1595 ValidArgsFunction: validArgsFunc,
1596 Run: emptyRun,
1597 }
1598 rootCmd.AddCommand(child)
1599
1600 buf := new(bytes.Buffer)
1601 assertNoErr(t, rootCmd.GenZshCompletionNoDesc(buf))
1602 output := buf.String()
1603
1604 check(t, output, ShellCompNoDescRequestCmd)
1605}
1606
1607func TestCompleteCmdInZshScript(t *testing.T) {
1608 rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun}

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…