2025-11-01 23:55:14 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
|
|
import (
|
2025-11-02 00:59:46 +00:00
|
|
|
"log/slog"
|
|
|
|
|
"os"
|
2025-11-01 23:55:14 +00:00
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
2025-11-02 00:31:15 +00:00
|
|
|
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.
|
2025-11-02 00:59:46 +00:00
|
|
|
log := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
|
|
|
|
|
Level: slog.LevelDebug,
|
|
|
|
|
}))
|
|
|
|
|
if err := Execute(log); err != nil {
|
2025-11-02 00:31:15 +00:00
|
|
|
t.Errorf("Execute() failed: %v", err)
|
2025-11-02 00:02:34 +00:00
|
|
|
}
|
|
|
|
|
}
|