--list-test-names quotes test names that start with #

- completes #717
This commit is contained in:
Phil Nash 2016-09-27 10:43:03 +01:00
parent 31861bbd46
commit 21cbfc107e

View File

@ -68,6 +68,9 @@ namespace Catch {
++it ) { ++it ) {
matchedTests++; matchedTests++;
TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); TestCaseInfo const& testCaseInfo = it->getTestCaseInfo();
if( startsWith( testCaseInfo.name, "#" ) )
Catch::cout() << "\"" << testCaseInfo.name << "\"" << std::endl;
else
Catch::cout() << testCaseInfo.name << std::endl; Catch::cout() << testCaseInfo.name << std::endl;
} }
return matchedTests; return matchedTests;