summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-22 13:51:14 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-22 13:51:14 +0200
commit0a06541e4b894416e9211bd0d5b14f877de46d59 (patch)
tree47396fd008d64b4384f75d1d55499df77ca93740 /test
parent94ad73cf74d7f1cf02913e2f462c01028a8ef4b4 (diff)
downloadcolitur-0a06541e4b894416e9211bd0d5b14f877de46d59.tar.gz
colitur-0a06541e4b894416e9211bd0d5b14f877de46d59.zip
docs(cli): --help's rubrics section drifted to three fields, it has four
Task 5 (celebrant-rubrics-phase1) added a fourth rubrics column, creed, and updated the man page for it. bin/main.ml's own built-in --help was not: its "output formats" section and worked example still showed three fields (date, formulary slug, source), and nothing caught it because test/cli.t pins command dispatch but never the help body. Fixed the format line and its example, and added a short mention of the creed column to the surrounding prose paragraph (source, format, what --overlay/--lang/--raw do to it), matching the man page's own account without copying it verbatim. test/cli.t now cross-checks --help's own rubrics example against what `colitur rubrics 2026` actually prints for the identical day, so the two cannot silently drift apart again in either direction. Mutation-proved: reverting the field count in --help alone (output unchanged) reddens exactly this new check; reverted clean.
Diffstat (limited to 'test')
-rw-r--r--test/cli.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/cli.t b/test/cli.t
index 971e442..5bf8d83 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -334,6 +334,23 @@ is the check that catches help text drifting away from the dispatch:
$ for c in easter temporal day readings rubrics; do colitur $c 2026 > /dev/null || echo "$c FAILED"; done
+`rubrics`' own field count drifted once already (Task 5 landed a fourth
+column, creed; --help's "output formats" section and its worked example
+still showed three, and stayed wrong for a whole review round because
+nothing here pinned the help BODY, only command dispatch above). This
+compares --help's own worked example against what `rubrics` actually
+prints for the identical day, so the two cannot silently drift apart
+again in either direction:
+
+ $ colitur --help | grep '^ rubrics date'
+ rubrics date, formulary slug, source, creed -- TAB-separated
+
+ $ colitur --help | sed -n '/^ rubrics date/{n;p}'
+ 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true
+
+ $ colitur rubrics 2026 | grep '^2026-01-01' | sed $'s/\t/[TAB]/g'
+ 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true
+
--version prints the version alone, to standard output, exit 0. Deliberately
not embedded in the help text above: this pin would then have to be edited
every release, for no gain. The Makefile's release target asserts the built