fix(hashline): restore v3.11.2 legacy hash computation for backward compatibility
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
This commit is contained in:
@@ -125,6 +125,15 @@ describe("validateLineRef", () => {
|
||||
expect(() => validateLineRef(lines, `1#${legacyHash}`)).not.toThrow()
|
||||
})
|
||||
|
||||
it("accepts legacy hashes for internal whitespace variants", () => {
|
||||
//#given
|
||||
const lines = ["if (a && b) {"]
|
||||
const legacyHash = computeLegacyLineHash(1, "if(a&&b){")
|
||||
|
||||
//#when / #then
|
||||
expect(() => validateLineRef(lines, `1#${legacyHash}`)).not.toThrow()
|
||||
})
|
||||
|
||||
it("shows >>> mismatch context in batched validation", () => {
|
||||
//#given
|
||||
const lines = ["one", "two", "three", "four"]
|
||||
|
||||
Reference in New Issue
Block a user