mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Updated approvalTests script to allow for modified version strings
This commit is contained in:
parent
57df3ba998
commit
5d5ed5a283
@ -15,7 +15,8 @@ pathParser = re.compile( r'(.*?)/(.*\..pp)(.*)' )
|
|||||||
lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' )
|
lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' )
|
||||||
hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' )
|
hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' )
|
||||||
durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' )
|
durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' )
|
||||||
versionParser = re.compile( r'(.*?)Catch v[0-9]*\.[0-9]*\.[0-9].?( .*)' )
|
versionParser = re.compile( r'(.*?)Catch v[0-9]*\.[0-9]*\.[0-9]*(.*)' )
|
||||||
|
devVersionParser = re.compile( r'(.*?)Catch v[0-9]*\.[0-9]*\.[0-9]*-develop\.[0-9]*(.*)' )
|
||||||
|
|
||||||
if len(sys.argv) == 2:
|
if len(sys.argv) == 2:
|
||||||
cmdPath = sys.argv[1]
|
cmdPath = sys.argv[1]
|
||||||
@ -41,9 +42,13 @@ def filterLine( line ):
|
|||||||
if path.startswith( catchPath ):
|
if path.startswith( catchPath ):
|
||||||
path = path[1+len(catchPath):]
|
path = path[1+len(catchPath):]
|
||||||
line = m.group(1) + path + m.group(3)
|
line = m.group(1) + path + m.group(3)
|
||||||
m = versionParser.match( line )
|
m = devVersionParser.match( line )
|
||||||
if m:
|
if m:
|
||||||
line = m.group(1) + "<version>" + m.group(2)
|
line = m.group(1) + "<version>" + m.group(2)
|
||||||
|
else:
|
||||||
|
m = versionParser.match( line )
|
||||||
|
if m:
|
||||||
|
line = m.group(1) + "<version>" + m.group(2)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
m = hexParser.match( line )
|
m = hexParser.match( line )
|
||||||
|
Loading…
Reference in New Issue
Block a user