ekp/tests
Kinneyzhang 3fc05c1405 feat: typography wave — dictionary HYPHENMIN, JIS kinsoku, fast indent
Three quality gaps closed, one of them unlocking the C engine for
the most common Chinese configuration:

- first-line indent now runs on the 1D DP and the C engine (module
  1.5: ekp-c-break-with-arrays grows a 15th arg FIRST-LINE-WIDTH).
  A line starts at box 0 exactly when i = 0, so no (position x
  line-count) state is needed; only true parshape and looseness
  still take the 2D Elisp path.  Indented Chinese sample, w=400:
  C engine 82 ms (this configuration previously bypassed C entirely
  and ran the heaviest Elisp DP).  The C-result reconstruction
  mirrors the per-line width, and an equivalence test pins
  indent == the equivalent parshape across engines.
- LEFTHYPHENMIN / RIGHTHYPHENMIN are parsed from dictionaries and
  applied (en_US declares 2/3; the hardcoded 2/2 allowed breaks
  like "gen-cy" that the dictionary forbids).  Explicit overrides
  still win; partial overrides keep the dictionary's other side.
- JIS X 4051 line-start prohibition for small kana, the prolonged
  sound mark and iteration marks (new defcustom
  ekp-cjk-no-line-start-extra, char-table backed): っょー々 can no
  longer start a line.  Pure break-permission change; spacing and
  the DP are untouched.

Also fixed in passing:
- ekp--split-with-hyphen extracted regexp groups AFTER resolving
  the hyphenator; dictionary compilation clobbers the match data
  (latent since the resolver was hoisted; exposed by the HYPHENMIN
  parser) — groups are captured first now.
- ekp--first-indent-pixel goes through the width cache; it runs
  once per rendered line and was re-measuring the reference glyph
  every time (C path was 397 ms before, 82 ms after).

4 new ERT tests (92 total); fuzz 300/300 against C 1.5.
C module must be rebuilt: make -C ekp_c clean all

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 01:36:52 +08:00
..
ekp-bench.el refactor!: overhaul KP core — correctness, C parity, performance, tests, docs 2026-07-26 18:44:02 +08:00
ekp-demo.el feat: whole-buffer commands, DWIM, M-q remap, org/markdown wiring 2026-07-27 01:08:40 +08:00
ekp-fuzz.el refactor!: overhaul KP core — correctness, C parity, performance, tests, docs 2026-07-26 18:44:02 +08:00
ekp-region-tests.el perf(region): smarter lazy re-flow scheduling 2026-07-27 01:11:05 +08:00
ekp-showcase.el feat: whole-buffer commands, DWIM, M-q remap, org/markdown wiring 2026-07-27 01:08:40 +08:00
ekp-tests.el feat: typography wave — dictionary HYPHENMIN, JIS kinsoku, fast indent 2026-07-27 01:36:52 +08:00
run-tests.sh feat: buffer-level justification — region commands and auto-justify mode 2026-07-26 20:23:03 +08:00
text-de_DE.txt update readme 2025-07-27 21:35:44 +08:00
text-en_US.txt update readme 2025-07-27 21:35:44 +08:00
text-fr.txt update readme 2025-07-27 21:35:44 +08:00
text-zh2-en_US.txt fix _ local variable bug 2025-07-28 16:58:30 +08:00
text-zh-en_US.txt fix bug when text is blank string 2025-09-26 00:18:37 +08:00
text-zh.txt add chinese example 2025-07-28 00:33:53 +08:00