diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-21 16:12:56 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-23 08:22:15 -0400 |
| commit | 8b81e9a11c7af642c4d0d8584a9cb348cc887d6e (patch) | |
| tree | 8ba9c356ff71bf18f5623c22d30a8b2513321cfe /test/run-tests.sh | |
| parent | uid and paths separator "~" in place of ":" (diff) | |
ocda: warn if heading claims reserved segment name
spine automatically builds some segments, including: (toc, endnotes,
glossary, bibliography, bookindex, blurb, _the_title) these are now
identified as reserved names and a user is now warned if any of these
names have been manually assigned to a heading by markup. A document
still builds but to disambiguate the ocn of the heading is attached to
the markup (reserved) name and this is seeded before a document not
after. It is read off the finished abstraction rather than reported by
the parser, and beside the ocn alignment check for the same reason: it
is a statement about a document rather than a step in building one.
WARNING reserved segment name: the_autonomous_contract... [en]
heading 1 at ocn 135 asks for "endnotes", which spine gives its
own generated section
it is named "endnotes-135" instead; ...
A warning: the document is correct and complete and the name it ends
up with works.
--strict makes it a failure for the run, as it does for ocn alignment,
and by the same reasoning: the outputs are written and can be looked at,
and the exit status is taken at the end.
Two of the thirty-six sample documents have reserved segment names,
"1~endnotes" heading. Output is unchanged: nothing here touches the
abstraction.
(assisted by Claude-Code)
Diffstat (limited to 'test/run-tests.sh')
| -rwxr-xr-x | test/run-tests.sh | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/test/run-tests.sh b/test/run-tests.sh index d8822d4..f970194 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -23,12 +23,13 @@ # Order, and what depends on what: # # 1 test-abstraction-ssp.sh the abstraction has not changed -# 2 test-abstraction-ssp-roundtrip.sh the .ssp can be read back whole -# 3 test-abstraction-db.sh the two serialisations agree -# 4 test-abstraction-db-roundtrip.sh the .db can be read back whole -# 5 test-ocn-alignment.sh the languages agree on their ocns -# 6 test-acceptance-db-to-pod.sh a database gives its document back -# 7 test-epub-validity.sh the epubs a reader can actually open +# 2 test-run-order.sh nor does it depend on the run +# 3 test-abstraction-ssp-roundtrip.sh the .ssp can be read back whole +# 4 test-abstraction-db.sh the two serialisations agree +# 5 test-abstraction-db-roundtrip.sh the .db can be read back whole +# 6 test-ocn-alignment.sh the languages agree on their ocns +# 7 test-acceptance-db-to-pod.sh a database gives its document back +# 8 test-epub-validity.sh the epubs a reader can actually open # # None of them calls another, and each can be run on its own. The order # matters only for reading the result: @@ -36,21 +37,26 @@ # - 1 is first because it is the one that says whether the abstraction # itself moved. If it fails, the others are answering a different # question than you think, and its failure is the one to look at. -# - 2 reads the committed reference set, so it is only a statement about +# - 2 says that a document abstracted alone is the document abstracted in +# company. 1 only ever runs the whole sample set, so an abstraction +# that depended on what else was in the run passed it; this is the +# check that would have caught that, and the one that says an artefact +# can be verified on its own. +# - 3 reads the committed reference set, so it is only a statement about # the current binary if 1 passes. Run together, they say: the abstraction # is unchanged, and this binary can read that abstraction back. -# - 3 and 4 generate both artefacts themselves and depend on nothing +# - 4 and 5 generate both artefacts themselves and depend on nothing # committed. Since the database is built from the .ssp, they are checks # on the reader rather than on two independent writers. -# - 5 is about the sample documents rather than about a serialisation: it +# - 6 is about the sample documents rather than about a serialisation: it # asserts that spine reports the two known divergences in live-manual's # translations and reports nothing about the other documents. It will # fail if those translations are mended, which is the right moment to # hear about it. -# - 6 is the acceptance test for the document source claim, and the widest +# - 7 is the acceptance test for the document source claim, and the widest # of them: it builds a document from its pod and again from the database # that build produced, and requires the two output trees to be identical. -# Where 3 and 4 check one serialisation against another, this checks a +# Where 4 and 5 check one serialisation against another, this checks a # whole document through the whole pipeline twice. If it fails and the # others pass, what broke is the carrying or the materialising rather # than the abstraction. @@ -91,6 +97,7 @@ if [ -n "$_missing" ]; then fi TESTS="test-abstraction-ssp.sh +test-run-order.sh test-abstraction-ssp-roundtrip.sh test-abstraction-db.sh test-abstraction-db-roundtrip.sh |
