aboutsummaryrefslogtreecommitdiff
path: root/internal/caldata/of_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 10:35:21 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 10:35:21 +0200
commit44cb30b7ffcd776b26952080d1ec3587282a3db4 (patch)
tree7238005618b159b21215528ca5c3ea0c78808f64 /internal/caldata/of_test.go
parent9af8c834c393050179f6ff48c0766e9871e18240 (diff)
downloadlectio-44cb30b7ffcd776b26952080d1ec3587282a3db4.tar.gz
lectio-44cb30b7ffcd776b26952080d1ec3587282a3db4.zip
feat(of): seasonal weekday ferials from catholic-resources.org + date-based late Advent
Re-sources the proper weekdays of Advent (weeks 1-3), Lent, and Eastertide from catholic-resources.org (scripts/genlect-of-season-ferials-cr.py; single-cycle, so both -I/-II keys get the same readings). The diff caught real niedziela defects: - Easter weekday first readings contaminated (easter-3-mon had 1 Cor 15 instead of Acts 6:8-15; easter-4-thu had Rev 12 instead of Acts 13:13-25). - The Easter octave weekdays (Easter Mon-Sat) had no readings at all. - Stray psalm-numbering artifacts (147A(146), Ps42(41)) cleared. Late Advent (Dec 17-24) is proper to the DATE, not the Advent week, so temporal.go now keys those days 'advent-dec-<day>' (fixing the same by-date/by-week collision as the OT numbering) and the generator supplies them (Dec 17 = the genealogy Matt 1:1-17; Dec 24 = the Benedictus). 157 seasonal ferial-days render across 2026-2028 with 1 residual gap (christmas-octave-fri). Adds TestOFSeasonalFerials, credits the source, bumps to 0.43.0. Christmas-season weekdays (Dec 29-31, Jan 2-5) remain niedziela-sourced (CR's shifted layout + Epiphany-dependent assignment -- a documented follow-up).
Diffstat (limited to 'internal/caldata/of_test.go')
-rw-r--r--internal/caldata/of_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/caldata/of_test.go b/internal/caldata/of_test.go
index 91c9b59..086883a 100644
--- a/internal/caldata/of_test.go
+++ b/internal/caldata/of_test.go
@@ -85,3 +85,25 @@ func TestOFSundayCompleteReadings(t *testing.T) {
}
}
}
+
+func TestOFSeasonalFerials(t *testing.T) {
+ // Seasonal weekday ferials re-sourced from catholic-resources.org: an Easter
+ // weekday no longer contaminated, the Easter octave (was missing), and the
+ // date-based late-Advent days (Dec 17-24, keyed by date not by Advent week).
+ for _, tc := range []struct{ key, firstHas string }{
+ {"easter-3-mon-I", "Acts 6:8-15"}, // had 1 Cor 15 (contamination)
+ {"easter-octave-mon-I", "Acts 2:14"}, // was absent
+ {"advent-dec-17-I", "Genesis 49"},
+ {"advent-dec-24-I", "2 Samuel 7"},
+ } {
+ var first string
+ for _, r := range TemporalReadings("new", tc.key) {
+ if r.Part == "first" {
+ first = r.Citation
+ }
+ }
+ if !strings.Contains(first, tc.firstHas) {
+ t.Errorf("%s: first = %q, want containing %q", tc.key, first, tc.firstHas)
+ }
+ }
+}