summaryrefslogtreecommitdiff
path: root/internal/cli/command_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-10 23:11:30 +0300
committerPaul Buetow <paul@buetow.org>2026-04-10 23:11:30 +0300
commit65430e9876a32988839deb7a70dc1e42da21cf64 (patch)
treee0de040cb53d5b90587908f2d55e86e49664fc35 /internal/cli/command_test.go
parent4b4b3665230faafbd994f09894cb07c8f9d4b359 (diff)
Release 0.28.2v0.28.2
Diffstat (limited to 'internal/cli/command_test.go')
-rw-r--r--internal/cli/command_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/cli/command_test.go b/internal/cli/command_test.go
index 80626eb..4c95c3b 100644
--- a/internal/cli/command_test.go
+++ b/internal/cli/command_test.go
@@ -32,6 +32,9 @@ func TestCreateRootCommand(t *testing.T) {
if !strings.Contains(cmd.Long, "Explicit CLI and batch runs also use Nano Banana by default") {
t.Errorf("Expected Long description to describe the CLI and batch Nano Banana default")
}
+ if !strings.Contains(cmd.Long, "--retry-failed-assets") {
+ t.Errorf("Expected Long description to mention retry-failed-assets mode")
+ }
// Test that flags are set up
flagTests := []struct {
@@ -45,6 +48,7 @@ func TestCreateRootCommand(t *testing.T) {
{"batch", true},
{"skip-audio", true},
{"skip-images", true},
+ {"retry-failed-assets", true},
{"anki", true},
{"anki-csv", true},
{"deck-name", true},
@@ -119,6 +123,14 @@ func TestSetupFlags(t *testing.T) {
t.Errorf("Expected image-api help to describe the CLI Nano Banana default and config fallback, got %q", imageAPIFlag.Usage)
}
+ retryFailedAssetsFlag := cmd.Flags().Lookup("retry-failed-assets")
+ if retryFailedAssetsFlag == nil {
+ t.Fatal("retry-failed-assets flag not found")
+ }
+ if !strings.Contains(retryFailedAssetsFlag.Usage, "stopping on the first error") {
+ t.Errorf("Expected retry-failed-assets help to describe stop-on-first-error behavior, got %q", retryFailedAssetsFlag.Usage)
+ }
+
openAIVoiceFlag := cmd.Flags().Lookup("openai-voice")
if openAIVoiceFlag == nil {
t.Fatal("openai-voice flag not found")