diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-14 17:05:51 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-14 17:05:51 +0200 |
| commit | 6f5814ccdbc839b75c3e6de95a8ba9a755bc6ece (patch) | |
| tree | fdb96f0b5da902e03d6aa1ae5e14d46755d9ea96 /test/test_lectionary.ml | |
| parent | 2c0187f42cc45864932aba2529f876be86ddba39 (diff) | |
| download | colitur-6f5814ccdbc839b75c3e6de95a8ba9a755bc6ece.tar.gz colitur-6f5814ccdbc839b75c3e6de95a8ba9a755bc6ece.zip | |
data(ef): bootstrap the temporal lectionary from lectio
119 entries, Epistle + Gospel only. The generator refuses a section carrying
exactly one of the two: an Epistle without a Gospel is malformed and wants
investigating, not shipping. SHA-256 of the source INI is in the provenance
header, as with sanctoral.sexp.
Diffstat (limited to 'test/test_lectionary.ml')
| -rw-r--r-- | test/test_lectionary.ml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/test_lectionary.ml b/test/test_lectionary.ml index fba890a..c6a1cac 100644 --- a/test/test_lectionary.ml +++ b/test/test_lectionary.ml @@ -77,9 +77,23 @@ let test_load_never_raises () = | Error _ -> () | Ok _ -> Alcotest.fail "missing file: expected Error, got Ok" +let test_ef_data_file_loads () = + match Lectionary.load "../data/ef/lectionary.sexp" with + | Error e -> Alcotest.fail e + | Ok l -> + Alcotest.(check int) "entry count" 119 + (List.length (Lectionary.entries l)); + (match Lectionary.find l (slug "ef-lent-1-monday") with + | Some [ a; b ] -> + Alcotest.(check string) "epistle" "Ezech 34:11-16" a.Citation.reference; + Alcotest.(check string) "gospel" "Matt 25:31-46" b.Citation.reference + | Some _ -> Alcotest.fail "expected exactly two citations" + | None -> Alcotest.fail "ef-lent-1-monday missing") + let suite = [ ("find present", `Quick, test_find_present); ("find absent", `Quick, test_find_absent); ("duplicate slug rejected", `Quick, test_duplicate_slug_rejected); ("sexp round-trip", `Quick, test_sexp_round_trip); - ("load never raises", `Quick, test_load_never_raises) ] + ("load never raises", `Quick, test_load_never_raises); + ("ef data file loads", `Quick, test_ef_data_file_loads) ] |
