| 81 | overallResult = 0 |
| 82 | |
| 83 | def diffFiles(fileA, fileB): |
| 84 | with io.open(fileA, 'r', encoding='utf-8', errors='surrogateescape') as file: |
| 85 | aLines = [line.rstrip() for line in file.readlines()] |
| 86 | with io.open(fileB, 'r', encoding='utf-8', errors='surrogateescape') as file: |
| 87 | bLines = [line.rstrip() for line in file.readlines()] |
| 88 | |
| 89 | shortenedFilenameA = fileA.rsplit(os.sep, 1)[-1] |
| 90 | shortenedFilenameB = fileB.rsplit(os.sep, 1)[-1] |
| 91 | |
| 92 | diff = difflib.unified_diff(aLines, bLines, fromfile=shortenedFilenameA, tofile=shortenedFilenameB, n=0) |
| 93 | return [line for line in diff if line[0] in ('+', '-')] |
| 94 | |
| 95 | |
| 96 | def normalizeFilepath(line): |