mirror of
https://github.com/spf13/cobra
synced 2024-11-04 21:07:19 +00:00
20 lines
392 B
Go
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))
|
||
|
}
|