diff options
Diffstat (limited to 'test/test_calendar.ml')
| -rw-r--r-- | test/test_calendar.ml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test_calendar.ml b/test/test_calendar.ml index 2f6df6d..aeaeea0 100644 --- a/test/test_calendar.ml +++ b/test/test_calendar.ml @@ -464,6 +464,13 @@ let real_ef_layer_for_transfer_probes = if diagnostics <> [] then failwith "unexpected overlay diagnostics loading the real EF layer"; layer) +(* [Rite_ef.context] takes [~lectionary] (fix round 1, coordinator review) -- + caller-supplied, same as the sanctoral layer above. *) +let real_ef_lectionary_for_transfer_probes = + match Colitur_kernel.Lectionary.load "../data/ef/lectionary.sexp" with + | Error e -> failwith ("../data/ef/lectionary.sexp: " ^ e) + | Ok l -> l + let test_transferred_commemoration_only_capped_out_at_target_settles_cleanly () = let probe_date = match Colitur_kernel.Date_spec.fixed ~month:4 ~day:26 with Ok d -> d | Error e -> failwith e @@ -479,7 +486,11 @@ let test_transferred_commemoration_only_capped_out_at_target_settles_cleanly () let augmented_layer = Colitur_kernel.Layer.set real_ef_layer_for_transfer_probes probe in (* Liturgical year "2010" (Advent 2010 -- eve of Advent 2011) covers both 25 and 26 April 2011. *) - let year = C.year Rite_ef.context augmented_layer 2010 in + let year = + C.year + (Rite_ef.context ~lectionary:real_ef_lectionary_for_transfer_probes) + augmented_layer 2010 + in let find_date target = match Array.to_list year |> List.find_opt (fun d -> D.compare d.LD.date target = 0) with | Some d -> d |
