(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestCompletionCommand_Bash(t *testing.T) { |
| 23 | rootCmd := &cobra.Command{Use: "gh"} |
| 24 | completionCmd := NewCompletionCommand() |
| 25 | rootCmd.AddCommand(completionCmd) |
| 26 | |
| 27 | rootCmd.SetArgs([]string{"completion", "bash"}) |
| 28 | err := rootCmd.Execute() |
| 29 | |
| 30 | // Just verify no error - the actual script is generated by Cobra |
| 31 | require.NoError(t, err, "Bash completion generation should not error") |
| 32 | } |
| 33 | |
| 34 | func TestCompletionCommand_Zsh(t *testing.T) { |
| 35 | rootCmd := &cobra.Command{Use: "gh"} |
nothing calls this directly
no test coverage detected