diff options
Diffstat (limited to 'test/test_oracle.ml')
| -rw-r--r-- | test/test_oracle.ml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test_oracle.ml b/test/test_oracle.ml index e1e4184..f1ab9f1 100644 --- a/test/test_oracle.ml +++ b/test/test_oracle.ml @@ -227,6 +227,18 @@ let real_lectionary () = | Ok l -> l | Error e -> Alcotest.failf "../data/ef/lectionary.sexp: failed to load: %s" e +(* The Commons (data/ef/commons.sexp) travel the same caller-supplied seam + as the lectionary above, and [~commons] is required rather than defaulted + so that no caller can silently run with none -- nothing in layers 3-5 + compares reading citations, so a rite quietly missing its Commons would + be invisible. Loaded here even where this file asserts nothing about + readings, so that the rite under test is the same one bin/main.ml + assembles. *) +let real_commons () = + match Rite_ef.Lectionary_ef.Commons.load "../data/ef/commons.sexp" with + | Ok c -> c + | Error e -> Alcotest.failf "../data/ef/commons.sexp: failed to load: %s" e + (* ---------------------------------------------------------------------- *) (* The oracle side: one line per day, as tools/extract_missalemeum_oracle *) (* .py's own header documents. *) @@ -328,7 +340,7 @@ 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 rite = Rite_ef.context ~lectionary:(real_lectionary ()) ~commons:(real_commons ()) 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 layer y in |
