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

Function TestZshCompletionWithActiveHelp

zsh_completions_test.go:23–33  ·  zsh_completions_test.go::TestZshCompletionWithActiveHelp
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestZshCompletionWithActiveHelp(t *testing.T) {
24 c := &Command{Use: "c", Run: emptyRun}
25
26 buf := new(bytes.Buffer)
27 assertNoErr(t, c.GenZshCompletion(buf))
28 output := buf.String()
29
30 // check that active help is not being disabled
31 activeHelpVar := activeHelpEnvVar(c.Name())
32 checkOmit(t, output, fmt.Sprintf("%s=0", activeHelpVar))
33}

Callers

nothing calls this directly

Calls 6

GenZshCompletionMethod · 0.95
NameMethod · 0.95
activeHelpEnvVarFunction · 0.85
checkOmitFunction · 0.85
StringMethod · 0.80
assertNoErrFunction · 0.70

Tested by

no test coverage detected