acc: Support multiline patterns in diff.py (#2384)

## Changes
Fix diff.py to apply replacements that have newlines in them.

## Tests
Existing tests.
This commit is contained in:
Denis Bilenko 2025-02-26 14:25:39 +01:00 committed by GitHub
parent 03f2ff5a39
commit 6d27c7e69d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ def main():
elif f not in set1:
print(f"Only in {d2}: {f}")
else:
a = [replaceAll(patterns, x) for x in p1.read_text().splitlines(True)]
b = [replaceAll(patterns, x) for x in p2.read_text().splitlines(True)]
a = replaceAll(patterns, p1.read_text()).splitlines(True)
b = replaceAll(patterns, p2.read_text()).splitlines(True)
if a != b:
p1_str = p1.as_posix()
p2_str = p2.as_posix()