diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-15 00:05:35 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-15 00:05:35 +0200 |
| commit | f1d90a83ece4d8301061e8247e23ec2af8293ab4 (patch) | |
| tree | be9e86f504b4a1d5fee6e31cc5f5d230eba4522c /test | |
| parent | 6f5814ccdbc839b75c3e6de95a8ba9a755bc6ece (diff) | |
| download | colitur-f1d90a83ece4d8301061e8247e23ec2af8293ab4.tar.gz colitur-f1d90a83ece4d8301061e8247e23ec2af8293ab4.zip | |
data(ef): carry sanctoral propers on the celebration
Celebration.citations has existed in the type, the .mli and the sexp schema
since Plan 2 and has been emitted as () for every entry; the bootstrap now
writes the real values for the 208 entries lectio has them for.
On the celebration rather than in the lectionary table deliberately: a
diocesan overlay adding a saint then carries his readings through the
existing overlay algebra, with no second file to edit and no new directive.
Asserted both ways -- the 13 January proper is present, and no
Commemoration_only entry has readings, because in the EF a commemoration
contributes an oration, not a reading.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_sanctoral_ef.ml | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/test/test_sanctoral_ef.ml b/test/test_sanctoral_ef.ml index e3b34a6..2024dc2 100644 --- a/test/test_sanctoral_ef.ml +++ b/test/test_sanctoral_ef.ml @@ -7,6 +7,7 @@ module L = Colitur_kernel.Layer module Cel = Colitur_kernel.Celebration +module Citation = Colitur_kernel.Citation module S = Colitur_kernel.Slug module DS = Colitur_kernel.Date_spec module Col = Colitur_kernel.Colour @@ -138,6 +139,26 @@ let test_spot_check_commemoration () = Alcotest.(check (option string)) "name.pl" (Some "św. Maura, Opata") (Names.find cel.Cel.names (Lang.of_string_exn "pl")) +(* Task 3: sanctoral propers land on Celebration.citations, not a second + lectionary-shaped file -- see the bootstrap tool's own reasoning. *) +let test_sanctoral_carries_propers () = + let l = load () in + let e = find l "commemoration-of-the-baptism-of-the-lord" in + let refs = List.map (fun c -> c.Citation.reference) e.L.cel.Cel.citations in + Alcotest.(check (list string)) + "13 January carries its proper Epistle and Gospel" + [ "Isa 60:1-6"; "John 1:29-34" ] refs + +let test_commemoration_only_has_no_readings () = + let l = load () in + let bad = + List.filter + (fun e -> e.L.cel.Cel.status = Cel.Commemoration_only && e.L.cel.Cel.citations <> []) + l.L.entries + in + Alcotest.(check int) + "a commemoration contributes an oration, not a reading" 0 (List.length bad) + let suite = ( "Sanctoral_ef (data/ef/sanctoral.sexp)", [ Alcotest.test_case "load succeeds and counts match the source INI" `Quick @@ -145,4 +166,8 @@ let suite = Alcotest.test_case "spot-check: explicit class = lord (Purification of the BVM)" `Quick test_spot_check_explicit_class; Alcotest.test_case "spot-check: rank = commemoration (St. Maur, Abbot)" `Quick - test_spot_check_commemoration ] ) + test_spot_check_commemoration; + Alcotest.test_case "sanctoral entries carry their proper readings" `Quick + test_sanctoral_carries_propers; + Alcotest.test_case "Commemoration_only entries carry no readings" `Quick + test_commemoration_only_has_no_readings ] ) |
