Test: a site typed without its space is deliberately NOT folded
PHI 180 prints "Westpark" where the register says "West Park", so a spacing-insensitive fold looks like an obvious typo fix. Tried it, and it is wrong: the register ALSO carries both "Autumns Gate" and "Autumnsgate", and no rule can tell a missing space from two genuinely different places — it merged that pair. Reverted lib/sites.ts to its previous conservative behaviour and pinned the decision with a test. PHI 180's stored name was corrected to "West Park" by hand instead. Merging the two Autumn sites is the client's call, not a side effect of a re-import.
This commit is contained in:
parent
1b763ae99d
commit
ab89113489
1 changed files with 14 additions and 0 deletions
|
|
@ -280,3 +280,17 @@ test("folding never invents a site or splits a different one", () => {
|
|||
assert.equal(resolveSiteName("Cosmo City Extension", known), "Cosmo City Extension");
|
||||
assert.equal(resolveSiteName("Cosmo City North", known), "Cosmo City North");
|
||||
});
|
||||
|
||||
test("a site typed without its space is NOT folded — that would merge two real sites", () => {
|
||||
// PHI 180 prints "Westpark" where the register says "West Park", so this looks like a
|
||||
// spacing typo worth folding. It is deliberately left alone: the register ALSO carries
|
||||
// both "Autumns Gate" and "Autumnsgate", and a spacing-insensitive rule cannot tell a
|
||||
// typo from two genuinely different places — it would silently merge that pair.
|
||||
//
|
||||
// PHI 180's stored name was corrected to "West Park" by hand instead. Merging the two
|
||||
// Autumn sites is the client's call, not a side effect of a re-import.
|
||||
const known = ["West Park", "Autumns Gate", "Autumnsgate"];
|
||||
assert.equal(resolveSiteName("Westpark", known), "Westpark");
|
||||
assert.equal(resolveSiteName("Autumnsgate", known), "Autumnsgate");
|
||||
assert.equal(resolveSiteName("Autumns Gate", known), "Autumns Gate");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue