diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/cli.t | 4 | ||||
| -rw-r--r-- | test/golden/grid-2027.html | 2 | ||||
| -rw-r--r-- | test/golden/grid-2027.ms | 2 | ||||
| -rw-r--r-- | test/golden/ordo-2027.adoc | 2 | ||||
| -rw-r--r-- | test/golden/ordo-2027.html | 2 | ||||
| -rw-r--r-- | test/golden/ordo-2027.md | 2 | ||||
| -rw-r--r-- | test/golden/ordo-2027.ms | 2 | ||||
| -rw-r--r-- | test/golden/ordo-2027.tex | 4 | ||||
| -rw-r--r-- | test/golden/ordo-2027.typ | 4 | ||||
| -rw-r--r-- | test/test_lang_coverage.ml | 13 | ||||
| -rw-r--r-- | test/test_view.ml | 9 |
11 files changed, 33 insertions, 13 deletions
@@ -427,8 +427,8 @@ CSV emits a header and one row per day: JSON is one object, ICS one VCALENDAR: - $ colitur emit --format json --from 2027 --to 2027 | cut -c1-20 - {"rite":"ef","year": + $ colitur emit --format json --from 2027 --to 2027 | cut -c1-75 + {"rite":"ef","rite_name":"Missale Romanum, editio typica 1962","year":"2027 $ colitur emit --format ics --from 2027 --to 2027 | head -1 | cat -A | head -1 BEGIN:VCALENDAR^M$ diff --git a/test/golden/grid-2027.html b/test/golden/grid-2027.html index 2a85eca..f69b8f3 100644 --- a/test/golden/grid-2027.html +++ b/test/golden/grid-2027.html @@ -35,7 +35,7 @@ .violet{background:#eae} .rose{background:#fde} .black{background:#ddd} @media print{@page{size:landscape}body{margin:0}} </style></head><body> -<h1>Calendarium 2027 · ef</h1> +<h1>Calendarium 2027 · Roman Missal, 1962 typical edition</h1> <table> <caption>January</caption> diff --git a/test/golden/grid-2027.ms b/test/golden/grid-2027.ms index 98e9594..b7539ed 100644 --- a/test/golden/grid-2027.ms +++ b/test/golden/grid-2027.ms @@ -96,7 +96,7 @@ .nr LL 10.9i .ll \n[LL]u .TL -Calendarium 2027 \(bu ef +Calendarium 2027 \(bu Roman Missal, 1962 typical edition .ll \n[LL]u .na diff --git a/test/golden/ordo-2027.adoc b/test/golden/ordo-2027.adoc index f3d33cb..7eae94c 100644 --- a/test/golden/ordo-2027.adoc +++ b/test/golden/ordo-2027.adoc @@ -12,7 +12,7 @@ // (Ordo, Epistle, Gospel, Commemoration) comes from the view's term // vocabulary rather than being written into this file, so a translated // booklet needs no template edit. -= Ordo 2027 · ef += Ordo 2027 · Roman Missal, 1962 typical edition :toc: diff --git a/test/golden/ordo-2027.html b/test/golden/ordo-2027.html index 96ec943..ce7aa26 100644 --- a/test/golden/ordo-2027.html +++ b/test/golden/ordo-2027.html @@ -20,7 +20,7 @@ .rose{border-left:4px solid #e7a} .black{border-left:4px solid #000} @media print{body{margin:0}} </style></head><body> -<h1>Ordo 2027 · ef</h1> +<h1>Ordo 2027 · Roman Missal, 1962 typical edition</h1> <h2>January</h2> <div class="day white"> <span class="dom">1</span>The Octave Day of the Nativity diff --git a/test/golden/ordo-2027.md b/test/golden/ordo-2027.md index 4742dc2..ac3419f 100644 --- a/test/golden/ordo-2027.md +++ b/test/golden/ordo-2027.md @@ -11,7 +11,7 @@ (Ordo, Epistle, Gospel, Commemoration) comes from the view's term vocabulary rather than being written into this file, so a translated booklet needs no template edit. --> -# Ordo 2027 · ef +# Ordo 2027 · Roman Missal, 1962 typical edition ## January diff --git a/test/golden/ordo-2027.ms b/test/golden/ordo-2027.ms index 9e869dd..4594e43 100644 --- a/test/golden/ordo-2027.ms +++ b/test/golden/ordo-2027.ms @@ -10,7 +10,7 @@ .\" vocabulary rather than being written into this file, so a translated .\" booklet needs no template edit. .TL -Ordo 2027 \(bu ef +Ordo 2027 \(bu Roman Missal, 1962 typical edition .SH January diff --git a/test/golden/ordo-2027.tex b/test/golden/ordo-2027.tex index c447f99..21b711e 100644 --- a/test/golden/ordo-2027.tex +++ b/test/golden/ordo-2027.tex @@ -61,7 +61,7 @@ % alone cannot outline a filled rule. \newcommand{\swatch}[1]{\tikz[baseline=-0.6ex]{\fill[draw=black,line width=0.4pt,fill=#1] (0,0) rectangle (2.4ex,2.4ex);}} \pagestyle{fancy}\fancyhf{} -\fancyhead[C]{\small Ordo 2027 \textperiodcentered\ ef} +\fancyhead[C]{\small Ordo 2027 \textperiodcentered\ Roman Missal, 1962 typical edition} \fancyfoot[C]{\small\thepage} \renewcommand{\headrulewidth}{0.4pt} \setlength{\parindent}{0pt} @@ -69,7 +69,7 @@ \begin{center} \Large\bfseries Ordo 2027\\[2pt] -\normalsize\mdseries ef +\normalsize\mdseries Roman Missal, 1962 typical edition \end{center} \vspace{4mm} {\bfseries Contents}\par\vspace{2mm} diff --git a/test/golden/ordo-2027.typ b/test/golden/ordo-2027.typ index 8abad25..2f3cf92 100644 --- a/test/golden/ordo-2027.typ +++ b/test/golden/ordo-2027.typ @@ -61,7 +61,7 @@ paper: "a5", margin: (inside: 14mm, outside: 10mm, top: 12mm, bottom: 12mm), numbering: "1", - header: align(center)[#text(size: 8pt)[Ordo 2027 #sym.dot.c ef]], + header: align(center)[#text(size: 8pt)[Ordo 2027 #sym.dot.c Roman Missal, 1962 typical edition]], ) #set text(size: 9pt) #set par(justify: false) @@ -82,7 +82,7 @@ #align(center)[ #text(size: 18pt, weight: "bold")[Ordo 2027] \ - ef + Roman Missal, 1962 typical edition ] #v(4mm) #text(weight: "bold")[Contents] diff --git a/test/test_lang_coverage.ml b/test/test_lang_coverage.ml index 34758b2..9ed633c 100644 --- a/test/test_lang_coverage.ml +++ b/test/test_lang_coverage.ml @@ -80,6 +80,18 @@ let test_vocabularies_are_complete () = if L.month t n = string_of_int n then Alcotest.failf "no Latin month for %d" n done +(* Defect 1: the booklet used to print the bare rite id ("ef") because no + [rite] section existed in either language file. Walks every rite id the + engine can actually emit -- one today (Rite_ef.Temporal_ef.id, the same + id `Rite_ef.context` stamps onto every Rite.t.id -- see rite_ef.ml) -- so + this is cheap now and fails loudly the moment a second rite module (OF) + is wired in without a matching [rite] entry in la.ini. *) +let test_every_rite_has_a_latin_name () = + let t = la () in + List.iter + (fun id -> if L.rite t id = id then Alcotest.failf "no Latin display name for rite %S" id) + [ Rite_ef.Temporal_ef.id ] + (* lang/en.ini is DELIBERATELY partial (see its own header note): it declares [meta] fallback = la, so a slug it does not carry itself should still resolve through the chain to la.ini's name rather than degrade to the bare @@ -120,4 +132,5 @@ let suite = ( "Lang/coverage", [ Alcotest.test_case "every slug has a Latin name" `Slow test_every_slug_has_a_latin_name; Alcotest.test_case "vocabularies complete" `Quick test_vocabularies_are_complete; + Alcotest.test_case "every rite has a Latin name" `Quick test_every_rite_has_a_latin_name; Alcotest.test_case "en.ini falls back to Latin" `Quick test_en_falls_back_to_latin ] ) diff --git a/test/test_view.ml b/test/test_view.ml index b49b090..e8de6a0 100644 --- a/test/test_view.ml +++ b/test/test_view.ml @@ -66,6 +66,11 @@ let as_bool = function T.Bool b -> b | _ -> Alcotest.fail "expected a bool" let test_year_shape () = let v = view_of 2027 in Alcotest.(check string) "rite" "ef" (as_str (get [ "rite" ] v)); + (* Defect 1: [rite] stays the stable key ("ef"); [rite_name] is the + reader-facing display name a template prints instead. en.ini's own + [rite] section names it directly. *) + Alcotest.(check string) "rite_name" "Roman Missal, 1962 typical edition" + (as_str (get [ "rite_name" ] v)); Alcotest.(check string) "year" "2027" (as_str (get [ "year" ] v)); Alcotest.(check int) "twelve months" 12 (List.length (as_list (get [ "months" ] v))); Alcotest.(check int) "365 days" 365 (List.length (as_list (get [ "days" ] v))) @@ -193,7 +198,9 @@ let test_vocabularies_localise () = let d1 = List.hd (as_list (get [ "days" ] v)) in Alcotest.(check string) "weekday" "Feria VI" (as_str (get [ "weekday" ] d1)); Alcotest.(check string) "rank" "I classis" (as_str (get [ "rank_name" ] d1)); - Alcotest.(check string) "colour" "albus" (as_str (get [ "colour_name" ] d1)) + Alcotest.(check string) "colour" "albus" (as_str (get [ "colour_name" ] d1)); + Alcotest.(check string) "rite_name" "Missale Romanum, editio typica 1962" + (as_str (get [ "rite_name" ] v)) let suite = ( "View", |
