(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestCompleteCmdInFishScript(t *testing.T) { |
| 43 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun} |
| 44 | child := &Command{ |
| 45 | Use: "child", |
| 46 | ValidArgsFunction: validArgsFunc, |
| 47 | Run: emptyRun, |
| 48 | } |
| 49 | rootCmd.AddCommand(child) |
| 50 | |
| 51 | buf := new(bytes.Buffer) |
| 52 | assertNoErr(t, rootCmd.GenFishCompletion(buf, true)) |
| 53 | output := buf.String() |
| 54 | |
| 55 | check(t, output, ShellCompRequestCmd) |
| 56 | checkOmit(t, output, ShellCompNoDescRequestCmd) |
| 57 | } |
| 58 | |
| 59 | func TestProgWithDash(t *testing.T) { |
| 60 | rootCmd := &Command{Use: "root-dash", Args: NoArgs, Run: emptyRun} |
nothing calls this directly
no test coverage detected