(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestFishCompletionNoActiveHelp(t *testing.T) { |
| 90 | c := &Command{Use: "c", Run: emptyRun} |
| 91 | |
| 92 | buf := new(bytes.Buffer) |
| 93 | assertNoErr(t, c.GenFishCompletion(buf, true)) |
| 94 | output := buf.String() |
| 95 | |
| 96 | // check that active help is being disabled |
| 97 | activeHelpVar := activeHelpEnvVar(c.Name()) |
| 98 | check(t, output, fmt.Sprintf("%s=0", activeHelpVar)) |
| 99 | } |
| 100 | |
| 101 | func TestGenFishCompletionFile(t *testing.T) { |
| 102 | tmpFile, err := os.CreateTemp("", "cobra-test") |
nothing calls this directly
no test coverage detected