diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 23:44:36 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 23:44:36 +0200 |
| commit | e6eba32facf520d202f7941f43206e0f95141452 (patch) | |
| tree | 7519e518ac892d43a6bb4c9802fe5236cedf98dc /internal/caldata/of_test.go | |
| parent | 4a35093c4358be17da6f0f374197caed743bda26 (diff) | |
| download | lectio-e6eba32facf520d202f7941f43206e0f95141452.tar.gz lectio-e6eba32facf520d202f7941f43206e0f95141452.zip | |
feat(caldata): generate OF Sunday/solemnity lectionary from niedziela
Task 2. scripts/genlect-of.go harvests niedziela over the PAST cycle-equivalent
years 2023(A)/2024(B)/2025(C) -- niedziela only publishes ~6 weeks ahead, so the
future 2025-2027 span was unfetchable; the 3-year cycle repeats, so a liturgical
position's cycle-A readings are identical whether they fall in 2023 or 2026.
Produces internal/caldata/of-lectionary.ini: 254 entries (A=86, B=87, C=81),
keyed <slug>-<cycle>, citations English-canonical via ToEnglishRef.
Also: books.ini [en] Matthew gains "Mat" (ToEnglishRef maps Polish Mt->Mat; now
resolves and displays as Matt). of_test.go assertion relaxed to accept either
spelling.
KNOWN GAP: 8 cross-chapter range citations (e.g. Sirach 27:30-28:7, John
18:1-19:42) don't yet resolve -- the bible ref parser handles semicolon groups
but not a dash-range spanning a chapter boundary. Fix next.
Diffstat (limited to 'internal/caldata/of_test.go')
| -rw-r--r-- | internal/caldata/of_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/caldata/of_test.go b/internal/caldata/of_test.go index 7bc2ce1..b515a28 100644 --- a/internal/caldata/of_test.go +++ b/internal/caldata/of_test.go @@ -1,6 +1,7 @@ package caldata import ( + "strings" "testing" "time" @@ -22,8 +23,11 @@ func TestOFReadingsByCycle(t *testing.T) { gospel = r.Citation } } - if gospel == "" || gospel[:4] != "Matt" { - t.Fatalf("christ-the-king-A gospel = %q, want Matt…", gospel) + // The gospel of Christ the King (cycle A) is Matthew 25:31-46. The citation + // may spell Matthew as "Mat" (niedziela/ToEnglishRef) or "Matt" (seed); both + // resolve to Matthew via books.ini. + if !strings.HasPrefix(gospel, "Mat 25") && !strings.HasPrefix(gospel, "Matt 25") { + t.Fatalf("christ-the-king-A gospel = %q, want Matthew 25…", gospel) } } |
