package test import ( "testing" "github.com/stretchr/testify/assert" ) func TestCommand(t *testing.T) { cmd := Command() assert.NotNil(t, cmd) err := cmd.Execute() assert.Error(t, err) } func TestCommandInvalidFileName(t *testing.T) { cmd := Command() assert.NotNil(t, cmd) cmd.SetArgs([]string{"foo", "-f", ""}) err := cmd.Execute() assert.Error(t, err) }