2020-08-10 01:42:04 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/miguelmota/cointop/cointop"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TestCmd ...
|
|
|
|
func TestCmd() *cobra.Command {
|
|
|
|
testCmd := &cobra.Command{
|
|
|
|
Use: "test",
|
2020-08-11 05:23:46 +00:00
|
|
|
Short: "Runs tests for Homebrew",
|
2020-08-10 01:42:04 +00:00
|
|
|
Long: `The test command runs tests for Homebrew`,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
doTest()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return testCmd
|
|
|
|
}
|
|
|
|
|
|
|
|
// DoTest ...
|
|
|
|
func doTest() {
|
|
|
|
ct, err := cointop.NewCointop(&cointop.Config{
|
|
|
|
NoPrompts: true,
|
|
|
|
})
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
ct.Exit()
|
|
|
|
}
|