diff options
Diffstat (limited to 'test/test_oracle.ml')
| -rw-r--r-- | test/test_oracle.ml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_oracle.ml b/test/test_oracle.ml index c1d0e6a..e1e4184 100644 --- a/test/test_oracle.ml +++ b/test/test_oracle.ml @@ -220,6 +220,13 @@ let real_layer () = (List.map Overlay.diagnostic_to_string diagnostics); layer +(* [Rite_ef.context] takes [~lectionary] (fix round 1, coordinator review) -- + caller-supplied, same as [real_layer] above. *) +let real_lectionary () = + match Colitur_kernel.Lectionary.load "../data/ef/lectionary.sexp" with + | Ok l -> l + | Error e -> Alcotest.failf "../data/ef/lectionary.sexp: failed to load: %s" e + (* ---------------------------------------------------------------------- *) (* The oracle side: one line per day, as tools/extract_missalemeum_oracle *) (* .py's own header documents. *) @@ -321,9 +328,10 @@ let en = Lang.of_string_exn "en" let colitur_rows_2026_2027 () = let layer = real_layer () in + let rite = Rite_ef.context ~lectionary:(real_lectionary ()) in let by_rata : (int, (V.season, V.rank) LD.t) Hashtbl.t = Hashtbl.create 800 in for y = 2025 to 2027 do - let days = Cal.year Rite_ef.context layer y in + let days = Cal.year rite layer y in Array.iter (fun (d : (V.season, V.rank) LD.t) -> Hashtbl.replace by_rata (Date.to_rata d.LD.date) d) days done; let mk y m d = match Date.make ~year:y ~month:m ~day:d with Ok t -> t | Error e -> failwith e in |
