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

Function TestPwshCompletionNoActiveHelp

powershell_completions_test.go:23–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

NameMethod · 0.95
activeHelpEnvVarFunction · 0.85
checkFunction · 0.85
StringMethod · 0.80
assertNoErrFunction · 0.70

Tested by

no test coverage detected