aboutsummaryrefslogtreecommitdiff
path: root/internal/cli/cli_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/cli_test.go')
-rw-r--r--internal/cli/cli_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/cli/cli_test.go b/internal/cli/cli_test.go
index de9220a..d0c8791 100644
--- a/internal/cli/cli_test.go
+++ b/internal/cli/cli_test.go
@@ -105,6 +105,27 @@ func TestLangBogus(t *testing.T) {
}
}
+// TestBannerForLang checks bannerFor's wording follows lang: pl reproduces
+// the pre-i18n Polish banner exactly ("Ewangelia na D" / "Czytania na D"),
+// en gives "Gospel for D" / "Readings for D".
+func TestBannerForLang(t *testing.T) {
+ cases := []struct {
+ lang string
+ all bool
+ want string
+ }{
+ {"pl", false, "Ewangelia na 2026-07-22"},
+ {"pl", true, "Czytania na 2026-07-22"},
+ {"en", false, "Gospel for 2026-07-22"},
+ {"en", true, "Readings for 2026-07-22"},
+ }
+ for _, c := range cases {
+ if got := bannerFor(c.lang, c.all, "2026-07-22"); got != c.want {
+ t.Errorf("bannerFor(%q, %v, ...) = %q, want %q", c.lang, c.all, got, c.want)
+ }
+ }
+}
+
// TestDateTokenAnyPosition exercises extractDate directly: the date token
// is found regardless of where it appears among other flags.
func TestDateTokenAnyPosition(t *testing.T) {