(t *testing.T)
| 1558 | } |
| 1559 | |
| 1560 | func TestNoValidArgsFuncInBashScript(t *testing.T) { |
| 1561 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun} |
| 1562 | child := &Command{ |
| 1563 | Use: "child", |
| 1564 | Run: emptyRun, |
| 1565 | } |
| 1566 | rootCmd.AddCommand(child) |
| 1567 | |
| 1568 | buf := new(bytes.Buffer) |
| 1569 | assertNoErr(t, rootCmd.GenBashCompletion(buf)) |
| 1570 | output := buf.String() |
| 1571 | |
| 1572 | checkOmit(t, output, "has_completion_function=1") |
| 1573 | } |
| 1574 | |
| 1575 | func TestCompleteCmdInBashScript(t *testing.T) { |
| 1576 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: emptyRun} |
nothing calls this directly
no test coverage detected