summaryrefslogtreecommitdiff
path: root/test/test_colitur.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 13:34:53 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 13:34:53 +0200
commit45bcbde502e07ad73b96039fcbb62471a3c94781 (patch)
tree515bd1465c75072ece7c70f8e2bcabd493f80417 /test/test_colitur.ml
parent6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff)
downloadcolitur-45bcbde502e07ad73b96039fcbb62471a3c94781.tar.gz
colitur-45bcbde502e07ad73b96039fcbb62471a3c94781.zip
feat(naming): the language table
Maps strings to strings and nothing else -- no calendars, no dates, no filesystem. That is what lets every command use it without the kernel learning about presentation. Every lookup is total, and a miss returns THE KEY rather than the empty string. A partial translation is therefore usable from its first line, and the fully-degraded case is exactly today's output (bare slugs) rather than a blank page. --raw is a real identity table, not a special case threaded through every call site: one value the whole program passes around. Reuses Overlay_ini's INI reader rather than growing a second one that would drift in its comment, quoting and trimming rules; parse_sections is exposed in the .mli for that, with no behaviour change. Fixes one defect found while running the brief's own tests rather than transcribing them blind: weekday's internal lookup key is an English day-name word (month's is already the numeral string), so on a miss it echoed that word instead of the documented numeral, breaking both the 0=Sunday convention and Lang.raw's own identity contract for weekday. weekday/month now fall back to string_of_int n directly on a miss instead of through get's generic echo-the-search-key path; month is byte-identical since its key already equals string_of_int n.
Diffstat (limited to 'test/test_colitur.ml')
-rw-r--r--test/test_colitur.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_colitur.ml b/test/test_colitur.ml
index 04bbdee..dd1274a 100644
--- a/test/test_colitur.ml
+++ b/test/test_colitur.ml
@@ -2,6 +2,7 @@
let () =
Alcotest.run "colitur"
[ Test_date.suite; Test_computus.suite; Test_colour.suite; Test_slug.suite; Test_names.suite;
+ Test_lang.suite;
Test_overlay.suite; Test_overlay_ini.suite; Test_temporal_ef.suite; Test_validate.suite; Test_precedence.suite;
Test_calendar.suite; Test_precedence_ef.suite; Test_sanctoral_ef.suite; Test_rite_ef.suite;
Test_differential.suite; Test_oracle.suite; Test_oracle.suite_2038; Test_oracle.suite_2035; Test_golden.suite;