Fixes #1766: Catch terminates when parsing invalid test name

This commit is contained in:
amitherman95 2019-10-19 16:50:46 +03:00 committed by Jozef Grajciar
parent 01ef7076f5
commit 84856844e1
12 changed files with 88 additions and 28 deletions

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 ) {