mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The iPhone builder asked what happens when two terms in one file share a spelling: on a phone both would become replacements with the same heard words. The spec only covered a spelling against the file's own replacements. Now: the earlier one wins (the file's own replacements come first), and a later one is notApplied as duplicate. One new phone merge case. Verified: the reference merger regenerates merge.json with only the new case added (25 cases); read.json and write.json unchanged; markdownlint clean. |
||
| .. | ||
| files | ||
| hex-words.schema.json | ||
| merge.json | ||
| read.json | ||
| README.md | ||
| write.json | ||
Hex words file: shared cases
The cases every Hex reads, merges and writes .hexwords files against: the desktop app
(Rust), Hex for iPhone and Hex for Android. The format is defined in
docs/specs/hex-words.md. This folder only proves it.
read.json: one case per file infiles/. Read its bytes (or, forgenerate, the base file followed by spaces up topadWithSpacesTobytes) and compare the whole result toexpect. Compareskippedas a set of{path, reason}. Where a case hasskippedCountsinstead, compare the number of skips per reason.merge.json:merge(receiver, before, incoming, limits, parts, choices)againstexpect.receiverisdesktoporphone, andlimitsoverrides the receiver's own for that case. Undo after each case must give backbefore.write.json: give the writerinput, parse what it wrote, dropmadeBy, and compare toexpect.file. Compareexpect.notExportedas a set. The written bytes must also be UTF-8 without a byte order mark, passhex-words.schema.json, and read back with nothing skipped.hex-words.schema.json: JSON Schema 2020-12 for what a writer writes.
Some files here are broken on purpose: not UTF-8, UTF-16, 10,000 levels deep. Keep them byte for byte. Don't reformat them, and don't let an editor fix their encoding.
A change to the definition that changes an outcome changes these cases in the same pull request.