summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 19:02:08 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 19:02:08 +0200
commit8ab24da337a10993b98696df5d499706318beb8e (patch)
tree140183b7fa246cbe5d148d7deb4d2412b6a91e23 /test
parent0506388da160a15ceddb0cea1a697d737103d5c4 (diff)
downloadcolitur-8ab24da337a10993b98696df5d499706318beb8e.tar.gz
colitur-8ab24da337a10993b98696df5d499706318beb8e.zip
kernel(celebration): distinguish a feast from a commemoration-only entry
The 1960 reform reduced many feasts to a bare commemoration. They keep a rank, because RG 111 orders admitted commemorations by dignity, but they can never be the observed day. Modelled as a separate status rather than a fifth rank: RG 8 fixes the classes at four.
Diffstat (limited to 'test')
-rw-r--r--test/test_names.ml15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_names.ml b/test/test_names.ml
index 809d1c0..cef7357 100644
--- a/test/test_names.ml
+++ b/test/test_names.ml
@@ -111,6 +111,20 @@ let test_celebration () =
let sexp = Cel.sexp_of_t sexp_of_demo_rank c in
Alcotest.(check bool) "sexp roundtrip" true (Cel.t_of_sexp demo_rank_of_sexp sexp = c)
+let test_celebration_status () =
+ let c =
+ Cel.make ~slug:(S.of_string_exn "telesphorus") ~rank:High ~colour:Col.Red
+ ~subject:Sub.Saint ~layer:"tridentine" ()
+ in
+ Alcotest.(check bool) "defaults to Feast" true (c.Cel.status = Cel.Feast);
+ let k =
+ Cel.make ~slug:(S.of_string_exn "hyginus") ~rank:High ~colour:Col.Red
+ ~status:Cel.Commemoration_only ~subject:Sub.Saint ~layer:"tridentine" ()
+ in
+ Alcotest.(check bool) "explicit status" true (k.Cel.status = Cel.Commemoration_only);
+ let sexp = Cel.sexp_of_t sexp_of_demo_rank k in
+ Alcotest.(check bool) "sexp roundtrip" true (Cel.t_of_sexp demo_rank_of_sexp sexp = k)
+
module Rec = Colitur_kernel.Record
module Voc = Colitur_kernel.Vocab
module Tmp = Colitur_kernel.Temporal
@@ -174,4 +188,5 @@ let suite =
Alcotest.test_case "date_spec sexp roundtrip" `Quick test_date_spec_sexp_roundtrip;
Alcotest.test_case "date_spec sexp validates" `Quick test_date_spec_sexp_validates;
Alcotest.test_case "celebration" `Quick test_celebration;
+ Alcotest.test_case "celebration status" `Quick test_celebration_status;
Alcotest.test_case "record" `Quick test_record ] )