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:
@@ -72,6 +72,19 @@ describe("computeLineHash", () => {
|
||||
expect(hash1).toBe(hash2)
|
||||
})
|
||||
|
||||
it("preserves legacy hashes for internal whitespace variants", () => {
|
||||
//#given
|
||||
const content1 = "if (a && b) {"
|
||||
const content2 = "if(a&&b){"
|
||||
|
||||
//#when
|
||||
const hash1 = computeLegacyLineHash(1, content1)
|
||||
const hash2 = computeLegacyLineHash(1, content2)
|
||||
|
||||
//#then
|
||||
expect(hash1).toBe(hash2)
|
||||
})
|
||||
|
||||
it("ignores trailing whitespace differences", () => {
|
||||
//#given
|
||||
const content1 = "function hello() {"
|
||||
|
||||
Reference in New Issue
Block a user