fix(overlay): resolve unspaced Japanese name splits and scan recovery (#146)

This commit is contained in:
2026-07-07 02:33:46 -07:00
committed by GitHub
parent e7739de51c
commit 61f39d1e09
19 changed files with 884 additions and 76 deletions
@@ -36,7 +36,20 @@ test('writeSnapshot persists and readSnapshot restores current-format snapshots'
writeSnapshot(snapshotPath, snapshot);
assert.deepEqual(readSnapshot(snapshotPath), snapshot);
assert.deepEqual(readSnapshot(snapshotPath), { ...snapshot, nameSplitSource: 'heuristic' });
});
test('readSnapshot preserves the mecab name-split source and defaults missing values to heuristic', () => {
const outputDir = makeTempDir();
const snapshotPath = getSnapshotPath(outputDir, 130298);
const snapshot: CharacterDictionarySnapshot = {
...createSnapshot(),
nameSplitSource: 'mecab',
};
writeSnapshot(snapshotPath, snapshot);
assert.equal(readSnapshot(snapshotPath)?.nameSplitSource, 'mecab');
});
test('readSnapshot ignores snapshots written with an older format version', () => {