aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cli.t29
-rw-r--r--test/dune9
2 files changed, 25 insertions, 13 deletions
diff --git a/test/cli.t b/test/cli.t
index f604872..00bbc21 100644
--- a/test/cli.t
+++ b/test/cli.t
@@ -578,10 +578,10 @@ error, exit 2, leaving stdout clean for whatever the caller was really trying
to capture.
$ colitur --help | head -1
- colitur -- deterministic liturgical calendar engine (Roman rite, 1962)
+ colitur -- deterministic liturgical calendar engine (Roman rite, EF 1962 and OF)
$ colitur -h | head -1
- colitur -- deterministic liturgical calendar engine (Roman rite, 1962)
+ colitur -- deterministic liturgical calendar engine (Roman rite, EF 1962 and OF)
$ colitur --help > /dev/null
$ colitur -h > /dev/null
@@ -601,21 +601,26 @@ 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
+column, creed; the documented "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
+nothing here pinned the documentation BODY, only command dispatch above). This
+compares the DOCUMENTED worked example against what `rubrics` actually
prints for the identical day, so the two cannot silently drift apart
-again in either direction:
+again in either direction.
- $ colitur --help | grep '^ rubrics date'
- rubrics date, formulary slug, source, creed, gloria, preface [name] -- TAB-separated
+The comparison reads the man page, not --help: --help was trimmed to one
+screen and now points at colitur(1) for every format, so this is where the
+worked example lives. The man page is named in test/dune's own cram deps for
+exactly this reason -- a cram sandbox holds only what that stanza lists.
- $ colitur --help | sed -n '/^ rubrics date/{n;p}'
- 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true[TAB]true[TAB]nativity[TAB]In Octava Nativitatis Domini
+ $ grep -c 'formulary\\-slug .TAB. source .TAB. creed' ../man/colitur.1
+ 1
+
+ $ sed 's/\\//g' ../man/colitur.1 | grep -o '2026-01-01 \[TAB\] ef-circumcision.*' | head -1
+ 2026-01-01 [TAB] ef-circumcision [TAB] own [TAB] true [TAB] true [TAB] nativity [TAB] In Octava Nativitatis Domini
- $ colitur rubrics 2026 | grep '^2026-01-01' | sed $'s/\t/[TAB]/g'
- 2026-01-01[TAB]ef-circumcision[TAB]own[TAB]true[TAB]true[TAB]nativity
+ $ colitur rubrics 2026 | grep '^2026-01-01' | sed $'s/\t/ [TAB] /g'
+ 2026-01-01 [TAB] ef-circumcision [TAB] own [TAB] true [TAB] true [TAB] nativity
--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
diff --git a/test/dune b/test/dune
index 0a3ade6..85facc9 100644
--- a/test/dune
+++ b/test/dune
@@ -105,4 +105,11 @@
../schema/day-v1.json
; Same trap, same fix: Task 8's --sigla-tradition flag makes the CLI read
; this file, and a cram sandbox holds only what this stanza names.
- ../lang/traditions.ini))
+ ../lang/traditions.ini
+ ; The man page is a DEP, not a runtime file the binary reads: cli.t's own
+ ; rubrics anti-drift check compares the documented worked example against
+ ; what `rubrics` actually prints, and that documentation now lives here
+ ; rather than in --help (trimmed to one screen). The check exists because
+ ; this exact field list drifted once and stayed wrong for a whole review
+ ; round; moving the prose without moving the check would quietly retire it.
+ ../man/colitur.1))