Fixes #1766: Catch terminates when parsing invalid test name

This commit is contained in:
amitherman95 authored and Jozef Grajciar committed 2019-10-19 21:14:06 +02:00
1 parent 01ef7076f5
commit 84856844e1
12 files changed
+88 -28

No files matched your search

+7 -1
View File
@@ -49,9 +49,15 @@ namespace Catch {
if( !line.empty() && !startsWith( line, '#' ) ) {
if( !startsWith( line, '"' ) )
line = '"' + line + '"';
config.testsOrTags.push_back( line + ',' );
config.testsOrTags.push_back( line );
config.testsOrTags.push_back( "," );
}
}
//Remove comma in the end
if(!config.testsOrTags.empty())
config.testsOrTags.erase( config.testsOrTags.end()-1 );
return ParserResult::ok( ParseResultType::Matched );
};
auto const setTestOrder = [&]( std::string const& order ) {