diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 13:09:22 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 13:09:22 +0200 |
| commit | fffae3b3cb50b1cf7d5b65eb592bfa1de2ed0e1c (patch) | |
| tree | c9515c212bf366b12a3c24482410b686ac48887c /test/test_temporal_ef.ml | |
| parent | 03d414cb1847fa4bdf4b9d521d6d2c0a47766113 (diff) | |
| download | colitur-fffae3b3cb50b1cf7d5b65eb592bfa1de2ed0e1c.tar.gz colitur-fffae3b3cb50b1cf7d5b65eb592bfa1de2ed0e1c.zip | |
rite(ef): season and rank vocabulary per RG 71-77 and RG 8
Eight seasons in canonical liturgical-year order, each carrying its RG
citation, and the four classes. season_slug_word is deliberately distinct from
season_to_string: slugs are lectionary keys adopted verbatim from lectio,
which calls Paschaltide 'easter' and Christmastide 'christmas'.
Diffstat (limited to 'test/test_temporal_ef.ml')
| -rw-r--r-- | test/test_temporal_ef.ml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_temporal_ef.ml b/test/test_temporal_ef.ml new file mode 100644 index 0000000..f7851c1 --- /dev/null +++ b/test/test_temporal_ef.ml @@ -0,0 +1,28 @@ +module V = Rite_ef.Vocab_ef + +let test_vocab_roundtrips () = + List.iter + (fun s -> + Alcotest.(check bool) "season string roundtrip" true + (V.season_of_string (V.season_to_string s) = Some s)) + V.seasons; + List.iter + (fun r -> + Alcotest.(check bool) "rank string roundtrip" true + (V.rank_of_string (V.rank_to_string r) = Some r)) + V.ranks; + Alcotest.(check int) "eight seasons" 8 (List.length V.seasons); + Alcotest.(check int) "four ranks" 4 (List.length V.ranks) + +(* Slug words are lectio's lectionary-key vocabulary, deliberately distinct from + the season names (spec ยง4.4, plan correction 2). *) +let test_slug_words () = + Alcotest.(check string) "paschaltide slugs as easter" "easter" (V.season_slug_word V.Paschaltide); + Alcotest.(check string) "christmastide slugs as christmas" "christmas" + (V.season_slug_word V.Christmastide); + Alcotest.(check string) "season name differs" "paschaltide" (V.season_to_string V.Paschaltide) + +let suite = + ( "Rite_ef", + [ Alcotest.test_case "vocab roundtrips" `Quick test_vocab_roundtrips; + Alcotest.test_case "slug words" `Quick test_slug_words ] ) |
