spf13--cobra/powershell_completions_test.go
Marc Khouzam fe08012edd
Rename Powershell completion tests (#1803)
The name of the powershell completion test file did not match
the actual powershell file.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
2022-09-11 15:04:53 -06:00

20 lines
392 B
Go

package cobra
import (
"bytes"
"fmt"
"testing"
)
func TestPwshCompletionNoActiveHelp(t *testing.T) {
c := &Command{Use: "c", Run: emptyRun}
buf := new(bytes.Buffer)
assertNoErr(t, c.GenPowerShellCompletion(buf))
output := buf.String()
// check that active help is being disabled
activeHelpVar := activeHelpEnvVar(c.Name())
check(t, output, fmt.Sprintf("%s=0", activeHelpVar))
}