convertor/tests
Ryo 13c8eea68a fix: handle binary formats and verify -V flag adjacency
Address second round of cubic-dev-ai review feedback:

P1: detectCJKFont only scans raw file bytes for CJK characters, which
misses CJK content inside compressed/binary formats (docx, epub, odt,
pptx). For these formats, always pass a CJK font to avoid missing glyphs.
Text formats still use content-based detection.

P3: Test assertions only checked that CJKmainfont value exists in args
array but did not verify -V flag precedes it. Added assertCJKFontArg
helper that checks -V adjacency for all CJK font tests.

Changes:
- Add binaryFormats set for docx/epub/odt/pptx
- Binary formats always get Noto Sans CJK SC (cannot detect language
  from raw bytes, SC is the safest default covering all CJK characters)
- Text formats continue using detectCJKFont for locale-aware detection
- Add assertCJKFontArg helper verifying -V precedes CJKmainfont value
- Add 3 new tests for binary formats (docx, epub, odt) with -V check
- 14 tests total, all passing
2026-07-02 10:43:26 +08:00
..
converters fix: handle binary formats and verify -V flag adjacency 2026-07-02 10:43:26 +08:00