diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-20 08:01:01 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-20 08:01:01 +0300 |
| commit | af2aa5e5efa82d3bc7cf5530e0a1eee72ba99244 (patch) | |
| tree | 609634b874bd4a82e5df7d9b56d8505cac14fdd6 /internal/comic/localization_test.go | |
| parent | a35ca6f40de73e93372ade6f2d74c231389799e2 (diff) | |
Fix task 25 follow-up: stop PNG prompt leaks and keep comics consistent
Diffstat (limited to 'internal/comic/localization_test.go')
| -rw-r--r-- | internal/comic/localization_test.go | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/internal/comic/localization_test.go b/internal/comic/localization_test.go index a1609f3..8855732 100644 --- a/internal/comic/localization_test.go +++ b/internal/comic/localization_test.go @@ -1,6 +1,9 @@ package comic -import "testing" +import ( + "strings" + "testing" +) func TestLocalizedBrandName(t *testing.T) { t.Parallel() @@ -40,3 +43,24 @@ func TestValidateNoPromptLeakage(t *testing.T) { t.Fatal("validateNoPromptLeakage() error = nil, want prompt leakage rejection") } } + +func TestFindImageLeakMarker(t *testing.T) { + t.Parallel() + + if marker, ok := findImageLeakMarker("calm text"); ok || marker != "" { + t.Fatalf("findImageLeakMarker() = %q, %v, want no match", marker, ok) + } + if marker, ok := findImageLeakMarker("mandatory language rule"); !ok || marker != "mandatory language rule" { + t.Fatalf("findImageLeakMarker() = %q, %v, want mandatory language rule match", marker, ok) + } +} + +func TestComicStylesStayComic(t *testing.T) { + t.Parallel() + + for _, style := range comicStyles { + if strings.Contains(strings.ToLower(style), "ultra realistic") || strings.Contains(strings.ToLower(style), "photograph") { + t.Fatalf("comicStyles contains hybrid or photorealistic style: %q", style) + } + } +} |
