summaryrefslogtreecommitdiff
path: root/test/test_lectionary.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_lectionary.ml')
-rw-r--r--test/test_lectionary.ml81
1 files changed, 56 insertions, 25 deletions
diff --git a/test/test_lectionary.ml b/test/test_lectionary.ml
index a95c98c..8fcf8e9 100644
--- a/test/test_lectionary.ml
+++ b/test/test_lectionary.ml
@@ -81,19 +81,24 @@ let test_ef_data_file_loads () =
match Lectionary.load "../data/ef/lectionary.sexp" with
| Error e -> Alcotest.fail e
| Ok l ->
- (* 119 lectio ini sections, translated/widened into colitur's own
- Temporal_ef vocabulary (tools/bootstrap_lectionary.ml's own
- [colitur_keys]/[vigil_entries]/[derived_entries] comments have the
- full account, task 8, branch ef-lectionary): Passiontide's 6
- shared sections each widen into 2 colitur keys (+6); "ef-christmas-
- sunday-0" widens into itself PLUS "ef-holy-name-sunday" (+1, a fix
- round after the first version replaced rather than widened it and
- broke a pre-existing test); one hand-authored entry sourced from
- lectio's SANCTORAL calendar, not this lectionary ini
- ([ef-nativity-vigil], +1); one entry derived from an
+ (* 119 lectio ini sections, translated/widened/renamed into colitur's
+ own Temporal_ef vocabulary, PLUS hand-authored/derived entries
+ (tools/bootstrap_lectionary.ml's own [colitur_keys]/
+ [vigil_entries]/[holy_week_entries]/[nativity_octave_entries]/
+ [derived_entries] comments have the full account, task 8, branch
+ ef-lectionary, fix round 1): "ef-christmas-sunday-0" widens into
+ itself PLUS "ef-holy-name-sunday" (+1); the six Passiontide/Lent-
+ Ember sections translate/rename 1:1 (no count change: Passiontide
+ no longer widens into two colitur keys since fix round 1's
+ Critical 1 correction, and the three Lent Ember sections rename
+ rather than widen); one hand-authored entry sourced from lectio's
+ SANCTORAL calendar, not this lectionary ini ([ef-nativity-vigil],
+ +1); four hand-authored directly from the Missal, Holy Week
+ (+4); three hand-authored directly from the Missal, the fixed
+ Nativity-Octave days (+3); one entry derived from an
already-translated one rather than re-typed ([ef-holy-name], +1).
- 119 + 6 + 1 + 1 + 1 = 128. *)
- Alcotest.(check int) "entry count" 128
+ 119 + 1 + 1 + 4 + 3 + 1 = 129. *)
+ Alcotest.(check int) "entry count" 129
(List.length (Lectionary.entries l));
(match Lectionary.find l (slug "ef-lent-1-monday") with
| Some [ a; b ] ->
@@ -101,9 +106,10 @@ let test_ef_data_file_loads () =
Alcotest.(check string) "gospel" "Matt 25:31-46" b.Citation.reference
| Some _ -> Alcotest.fail "expected exactly two citations"
| None -> Alcotest.fail "ef-lent-1-monday missing");
- (* Task 8's own renamed/derived keys, spot-checked here so a future
- regeneration that silently drops one of them fails loudly and
- locally, not only via the much bigger differential suite. *)
+ (* Task 8's own renamed/derived/hand-authored keys, spot-checked here
+ so a future regeneration that silently drops one of them fails
+ loudly and locally, not only via the much bigger differential
+ suite. *)
let check_entry name first gospel =
match Lectionary.find l (slug name) with
| Some [ a; b ] ->
@@ -119,17 +125,42 @@ let test_ef_data_file_loads () =
check_entry "ef-pentecost-ember-wed" "Acts 5:12-16" "John 6:44-52.";
check_entry "ef-pentecost-ember-fri" "Joel 2:23-24; 26-27" "Luke 5:17-26";
check_entry "ef-pentecost-ember-sat" "Rom 5:1-5." "Luke 4:38-44.";
+ (* Critical 2 fix (coordinator review round 1): the Lenten Ember days,
+ previously dead keys under lectio's own "ef-lent-1-<weekday>"
+ naming -- now reachable under colitur's own slugs. *)
+ check_entry "ef-lent-ember-wed" "3 Kgs. 19:3-8" "Matt 12:38-50";
+ (* Passiontide widens into Passion week ONLY now (Critical 1 fix) --
+ "ef-passiontide-1-monday" keeps lectio's own citation;
+ "ef-passiontide-2-monday" (Holy Monday) is Missal-sourced,
+ DIFFERENT text, hand-authored in [holy_week_entries]. *)
check_entry "ef-passiontide-1-monday" "Jonas 3:1-10" "John 7:32-39";
- check_entry "ef-passiontide-2-monday" "Jonas 3:1-10" "John 7:32-39";
- (* This one MUST be absent: rejected and reverted in the generator's
- own [derived_entries] comment -- a regression-net for that
- decision, not merely documentation of it. *)
- (match Lectionary.find l (slug "ef-nativity-octave-day-6") with
- | None -> ()
- | Some _ ->
- Alcotest.fail
- "ef-nativity-octave-day-6: must stay absent -- see bootstrap_lectionary.ml's own \
- derived_entries comment for why a direct entry here was tried and reverted")
+ check_entry "ef-passiontide-2-monday" "Isai. 50, 5-10" "Io. 12, 1-9";
+ check_entry "ef-passiontide-2-tuesday" "Ier. 11, 18-20" "Mark 14, 32-72; 15, 1-46";
+ check_entry "ef-passiontide-2-thursday" "1 Cor. 11, 20-32" "Io. 13, 1-15";
+ check_entry "ef-passiontide-2-saturday" "Col. 3, 1-4" "Matt. 28, 1-7";
+ (* Important 3(a) fix (coordinator review round 1): the fixed
+ Nativity-Octave days now carry their own direct Missal formulary
+ ("Diebus infra octavam Nativitatis Domini"), not Holy Name
+ Sunday's (a first guess, measured wrong, reverted -- see
+ [nativity_octave_entries]'s own comment). *)
+ check_entry "ef-nativity-octave-day-5" "Tit. 3, 4-7" "Luc. 2, 15-20";
+ check_entry "ef-nativity-octave-day-6" "Tit. 3, 4-7" "Luc. 2, 15-20";
+ check_entry "ef-nativity-octave-day-7" "Tit. 3, 4-7" "Luc. 2, 15-20";
+ (* These three MUST stay absent -- Holy Wednesday and Good Friday are
+ deliberately not hand-authored (multi-lesson liturgies, no single
+ Epistle slot; see [holy_week_entries]'s own comment for why), and
+ Lent's OWN "ef-lent-1-wednesday/friday/saturday" keys must not
+ reappear once renamed away (colitur never computes them as its
+ own slug at all). A regression net for those decisions, not
+ merely documentation of them. *)
+ let check_absent name =
+ match Lectionary.find l (slug name) with
+ | None -> ()
+ | Some _ -> Alcotest.fail (name ^ ": must stay absent -- see bootstrap_lectionary.ml")
+ in
+ check_absent "ef-passiontide-2-wednesday";
+ check_absent "ef-passiontide-2-friday";
+ check_absent "ef-lent-1-wednesday"
let suite =
[ ("find present", `Quick, test_find_present);