mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-21 01:15:39 +02:00
Do not resolve symbolic path when sanitizing filepath during approvals
Fixes #1691
This commit is contained in:
@@ -10,13 +10,13 @@ import re
|
||||
import difflib
|
||||
|
||||
import scriptCommon
|
||||
from scriptCommon import catchPath
|
||||
from scriptCommon import catchPathSymbolic
|
||||
|
||||
if os.name == 'nt':
|
||||
# Enable console colours on windows
|
||||
os.system('')
|
||||
|
||||
rootPath = os.path.join(catchPath, 'projects/SelfTest/Baselines')
|
||||
rootPath = os.path.join(catchPathSymbolic, 'projects/SelfTest/Baselines')
|
||||
|
||||
langFilenameParser = re.compile(r'(.+\.[ch]pp)')
|
||||
filelocParser = re.compile(r'''
|
||||
@@ -92,9 +92,9 @@ def diffFiles(fileA, fileB):
|
||||
|
||||
|
||||
def normalizeFilepath(line):
|
||||
if catchPath in line:
|
||||
if catchPathSymbolic in line:
|
||||
# make paths relative to Catch root
|
||||
line = line.replace(catchPath + os.sep, '')
|
||||
line = line.replace(catchPathSymbolic + os.sep, '')
|
||||
|
||||
m = langFilenameParser.match(line)
|
||||
if m:
|
||||
|
Reference in New Issue
Block a user