mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	No, really trim paths in approval tests down to just filenames
This commit is contained in:
		| @@ -7,7 +7,8 @@ from scriptCommon import catchPath | ||||
|  | ||||
| rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' ) | ||||
|  | ||||
| filenameParser = re.compile( r'.*?/(.*\..pp):([0-9]*)(.*)' ) | ||||
| filenameParser = re.compile( r'.*/(.*\..pp:)(.*)' ) | ||||
| filelineParser = re.compile( r'(.*\..pp:)([0-9]*)(.*)' ) | ||||
| lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' ) | ||||
| hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' ) | ||||
| durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' ) | ||||
| @@ -22,7 +23,10 @@ overallResult = 0 | ||||
| def filterLine( line ): | ||||
| 	m = filenameParser.match( line ) | ||||
| 	if m: | ||||
| 		line = m.group(1) + m.group(3) | ||||
| 		line = m.group(1) + m.group(2) | ||||
| 		m = filelineParser.match( line ) | ||||
| 		if m: | ||||
| 			line = m.group(1) + "<line number>" + m.group(3) | ||||
| 	else: | ||||
| 		m = lineNumberParser.match( line ) | ||||
| 		if m: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash