Fixed issue with single include generator

- well, partially. The problem is it is matching /* … */ comments by assuming the intervening lines begin with whitespace followed by a *. This avoids it having to maintain extra state, but makes it brittle.
It was matching *it = " " + *it; as a comment!
It now matches on a single space followed by a  * and this seems to work for now - but it probably needs to move to proper stateful comment handling.
This commit is contained in:
Phil Nash 2014-07-11 07:45:41 +01:00
parent ca42b2c585
commit 785db43bb2

View File

@ -16,7 +16,7 @@ ifParser = re.compile( r'\s*#ifndef TWOBLUECUBES_CATCH_.*_INCLUDED')
endIfParser = re.compile( r'\s*#endif // TWOBLUECUBES_CATCH_.*_INCLUDED')
ifImplParser = re.compile( r'\s*#ifdef CATCH_CONFIG_RUNNER' )
commentParser1 = re.compile( r'^\s*/\*')
commentParser2 = re.compile( r'^\s*\*')
commentParser2 = re.compile( r'^ \*')
blankParser = re.compile( r'^\s*$')
seenHeaders = set([])
rootPath = os.path.join( catchPath, 'include/' )