diff options
Diffstat (limited to 'test/test_golden.ml')
| -rw-r--r-- | test/test_golden.ml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/test_golden.ml b/test/test_golden.ml index 188e37f..2f8930f 100644 --- a/test/test_golden.ml +++ b/test/test_golden.ml @@ -64,6 +64,7 @@ module V = Rite_ef.Vocab_ef let sanctoral_path = "../data/ef/sanctoral.sexp" let adjustments_path = "../data/ef/adjustments.sexp" let lectionary_path = "../data/ef/lectionary.sexp" +let commons_path = "../data/ef/commons.sexp" (* Loaded once at module init, same convention test_validate.ml's own [real_ef_layer] uses (not test_oracle.ml/test_differential.ml's @@ -91,7 +92,19 @@ let real_ef_lectionary = | Error e -> failwith (Printf.sprintf "%s: failed to load: %s" lectionary_path e) | Ok l -> l -let real_ef_rite = Rite_ef.context ~lectionary:real_ef_lectionary +(* 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_ef_commons = + match Rite_ef.Lectionary_ef.Commons.load commons_path with + | Error e -> failwith (Printf.sprintf "%s: failed to load: %s" commons_path e) + | Ok c -> c + +let real_ef_rite = Rite_ef.context ~lectionary:real_ef_lectionary ~commons:real_ef_commons let mk y m d = match Date.make ~year:y ~month:m ~day:d with Ok t -> t | Error e -> failwith e |
