commands: Add CLI tests

See #4598
This commit is contained in:
Bjørn Erik Pedersen 2018-04-10 19:16:09 +02:00
parent 4d32f2fa89
commit e8d6ca9531
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
10 changed files with 199 additions and 71 deletions

View file

@ -32,10 +32,11 @@ var _ cmder = (*newThemeCmd)(nil)
type newThemeCmd struct {
*baseCmd
hugoBuilderCommon
}
func newNewThemeCmd() *newThemeCmd {
ccmd := &newThemeCmd{newBaseCmd(nil)}
ccmd := &newThemeCmd{baseCmd: newBaseCmd(nil)}
cmd := &cobra.Command{
Use: "theme [name]",
@ -53,7 +54,7 @@ as you see fit.`,
}
func (n *newThemeCmd) newTheme(cmd *cobra.Command, args []string) error {
c, err := initializeConfig(false, nil, n, nil)
c, err := initializeConfig(false, &n.hugoBuilderCommon, n, nil)
if err != nil {
return err