diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-21 12:49:54 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-22 15:11:02 -0400 |
| commit | eeabf6216fde5f387d6173da93d0df882ed8a34e (patch) | |
| tree | 1aab8a2fdba5f13199eeea6caebb7bea7b271670 /test/run-tests.sh | |
| parent | check: warn when document's languages ocn diverge (diff) | |
test: ocn alignment check
Asserts the two known divergences in live-manual's translations by name
and value: ja two objects short of en, and pl's ocn 313 a paragraph in
English and a heading in Polish.
It asserts that nothing else is reported: exactly one document warned
about, exactly two languages of it.
Also the exit codes: 0 without --strict, non-zero with it on the
diverging document, and 0 with it on a single language document.
It will fail when those two translations are mended, which is the right
moment to hear about it, and the message names the expectation that went
stale.
test-abstraction-db.sh excludes translation.ocn_aligned from its header
block comparison, with the other two keys that are the database's notes
about the artefact rather than properties of the document.
(assisted by Claude-Code)
Diffstat (limited to 'test/run-tests.sh')
| -rwxr-xr-x | test/run-tests.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/run-tests.sh b/test/run-tests.sh index 2f27892..4d950dc 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -22,7 +22,8 @@ # 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-epub-validity.sh the epubs a reader can actually open +# 5 test-ocn-alignment.sh the languages agree on their ocns +# 6 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,6 +37,11 @@ # - 3 and 4 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 +# 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. set -e @@ -61,6 +67,7 @@ TESTS="test-abstraction-ssp.sh test-abstraction-ssp-roundtrip.sh test-abstraction-db.sh test-abstraction-db-roundtrip.sh +test-ocn-alignment.sh test-epub-validity.sh" PASSED=0 |
