Skip to content

test: Check the hyphenation the specs expect - #46

Open
henrikottesorensen wants to merge 2 commits into
mainfrom
test/spec-hyphenate
Open

henrikottesorensen wants to merge 2 commits into
mainfrom
test/spec-hyphenate

Conversation

@henrikottesorensen

@henrikottesorensen henrikottesorensen commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

Built on #44. Until #44 merges, this PR also shows its commit (128b26e); the change here is the top commit only.

Stops skipping the 2,292 testmode: hyphenate entries, all in hu-hu-g1-hyph_harness.yaml. All of them pass.

What changed

  • Reader: hyphenate and hyphenateBraille become real test modes instead of skipped ones. display is now the only testmode still skipped.
  • Runner: the word goes through the wrapper's Hyphenate, with the translation table alone, as lou_checkyaml.c:905-909 does. The result is written out the way check_hyphenation does in brl_checks.c: - before every character flagged as a break point, | for a 2. A first flag other than 0 is a failure, as it is there. hyphenateBraille uses lou_hyphenate's braille mode, though no spec uses it yet.
  • Tally: testmode: hyphenate (2292) is gone.

Stricter than upstream

lou_checkyaml ignores what check_hyphenation returns, so upstream prints a hyphenation mismatch to stderr and passes anyway. Here a mismatch fails like any other case. That costs nothing today, because none of the 2,292 disagrees.

Testing

On macOS arm64:

  • LibLouis.NET.Test passes 237/237, and the solution builds with -warnaserror.
  • A temporary bug that wrote = instead of - failed 2,251 of the 2,292 cases; the other 41 are words with no break point.

Overlap with #45

Both PRs change the reader's case-building code in BrailleSpec.cs and Run in BrailleSpecRunner.cs, so whichever merges second needs a rebase there; the tally merges cleanly. I can do that rebase once the first one lands.

🤖 Generated with Claude Code

henrikottesorensen and others added 2 commits December 5, 2026 16:05
The eight dictionary harnesses are 60MB and 1,953,878 cases between
them, about two minutes against the spec suite's twenty seconds. They
all pass against 3.40.0, so leaving them out of LibLouis.NET.Test cost
the tables' word lists rather than hiding a failure, but nothing ran
them.

LibLouis.NET.DictionaryTest runs them. It reads them from the release
build/stage_tables.sh already downloads rather than from a committed
copy, so the repository does not grow by 60MB and they follow
LiblouisVersion with nothing to re-copy. They are listed one by one: a
wildcard on "dictionary" also matches nine ordinary specs
LibLouis.NET.Test already runs. The build fails, naming stage_tables.sh,
if they have not been staged, rather than discovering no tests.

The harness moves out of BrailleSpecTests into BrailleSpecRunner so both
projects compile the same one. The code moves unchanged.

CI runs them in a dictionary-test job on the same three operating
systems as test, beside it rather than after it, so pull requests wait
no longer and a failure among them is reported apart from the main
suite. publish waits for it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2,292 spec entries were dropped as testmode: hyphenate, all of them in
hu-hu-g1-hyph_harness.yaml. They are now run: the word goes through
the wrapper's Hyphenate with the translation table alone, as
lou_checkyaml does (lou_checkyaml.c:905-909), and is written out the
way check_hyphenation does (brl_checks.c): a '-' before every character
flagged as a break point, '|' for a '2'. A first flag other than '0' is
a failure, as it is there. hyphenateBraille is driven the same way with
lou_hyphenate's braille mode, though no spec uses it yet.

All 2,292 pass. Writing '=' instead of '-' fails 2,251 of them; the
other 41 are words with no break point.

lou_checkyaml ignores what check_hyphenation returns, so upstream
prints a hyphenation mismatch and passes anyway. Here one fails like
any other case, which is stricter than upstream, and it turns out to
cost nothing: none of the 2,292 disagrees.

The tally loses testmode: hyphenate (2292). display is now the only
testmode still skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@henrikottesorensen
henrikottesorensen requested a review from a team December 5, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant