aboutsummaryrefslogtreecommitdiff
path: root/internal/calendar/temporal_ef_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/calendar/temporal_ef_test.go')
-rw-r--r--internal/calendar/temporal_ef_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/internal/calendar/temporal_ef_test.go b/internal/calendar/temporal_ef_test.go
index e8ef391..d930cc7 100644
--- a/internal/calendar/temporal_ef_test.go
+++ b/internal/calendar/temporal_ef_test.go
@@ -334,3 +334,29 @@ func TestTemporalEFRogationDays(t *testing.T) {
"commemoration cannot be built here without displacing the Vigil", got.Cel.Slug)
}
}
+
+// TestTemporalEFPassiontideWeeks pins that Passion week and Holy Week are
+// numbered apart. They are two weeks with entirely different Masses, and
+// efWeek used to give both 0 -- so every day of Holy Week took the slug of its
+// Passion-week namesake and the two shared one set of readings.
+//
+// Good Friday is the case that shows why it matters: it was reading Passion
+// Friday's Mass.
+func TestTemporalEFPassiontideWeeks(t *testing.T) {
+ easter := d("2026-04-05")
+ for _, c := range []struct {
+ off int
+ slug string
+ }{
+ {-13, "ef-passiontide-1-monday"}, // Passion week
+ {-11, "ef-passiontide-1-wednesday"},
+ {-6, "ef-passiontide-2-monday"}, // Holy Week
+ {-2, "ef-passiontide-2-friday"}, // Good Friday
+ } {
+ day := easter.AddDate(0, 0, c.off)
+ if got := temporalEF(day).Cel.Slug; got != c.slug {
+ t.Errorf("Easter%+d (%s): slug = %q, want %q -- Passion week and Holy Week "+
+ "must not share a slug", c.off, day.Format("2006-01-02"), got, c.slug)
+ }
+ }
+}