18 lines
379 B
Go
18 lines
379 B
Go
package cmd
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestExecute(t *testing.T) {
|
|
// This test simply checks that the Execute function can be called without error.
|
|
// It doesn't actually test any of the application's functionality.
|
|
rootCmd.SetArgs([]string{})
|
|
t.Cleanup(func() {
|
|
rootCmd.SetArgs(nil)
|
|
})
|
|
if err := Execute(); err != nil {
|
|
t.Errorf("Execute() failed: %v", err)
|
|
}
|
|
}
|
|
}
|