mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-31 17:07:52 +00:00
Improve erasure of test numbers in TAP approvals
This commit is contained in:
parent
c50ba09cde
commit
63b7d6f98e
2 changed files with 10 additions and 10 deletions
|
@ -71,7 +71,7 @@ nanParser = re.compile(r'''
|
|||
''', re.VERBOSE)
|
||||
|
||||
# The weird OR is there to always have at least empty string for group 1
|
||||
tapTestNumParser = re.compile(r'^(not |)?ok (\d+) -')
|
||||
tapTestNumParser = re.compile(r'^((?:not ok)|(?:ok)|(?:warning)|(?:info)) (\d+) -')
|
||||
|
||||
if len(sys.argv) == 2:
|
||||
cmdPath = sys.argv[1]
|
||||
|
@ -128,7 +128,7 @@ def filterLine(line, isCompact):
|
|||
line = line.replace(': PASSED', ': passed')
|
||||
|
||||
# strip out the test order number in TAP to avoid massive diffs for every change
|
||||
line = tapTestNumParser.sub("\g<1>ok {test-number} -", line)
|
||||
line = tapTestNumParser.sub("\g<1> {test-number} -", line)
|
||||
|
||||
# strip Catch version number
|
||||
line = versionParser.sub("<version>", line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue