(t *testing.T)
| 1573 | } |
| 1574 | |
| 1575 | func TestCompleteCmdInBashScript(t *testing.T) { |
| 1576 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun} |
| 1577 | child := &Command{ |
| 1578 | Use: "child", |
| 1579 | ValidArgsFunction: validArgsFunc, |
| 1580 | Run: emptyRun, |
| 1581 | } |
| 1582 | rootCmd.AddCommand(child) |
| 1583 | |
| 1584 | buf := new(bytes.Buffer) |
| 1585 | assertNoErr(t, rootCmd.GenBashCompletion(buf)) |
| 1586 | output := buf.String() |
| 1587 | |
| 1588 | check(t, output, ShellCompNoDescRequestCmd) |
| 1589 | } |
| 1590 | |
| 1591 | func TestCompleteNoDesCmdInZshScript(t *testing.T) { |
| 1592 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun} |
nothing calls this directly
no test coverage detected