From 21cbfc107e41710266ec9a6f3725aed9e47620cc Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 27 Sep 2016 10:43:03 +0100 Subject: [PATCH] --list-test-names quotes test names that start with # - completes #717 --- include/internal/catch_list.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_list.hpp b/include/internal/catch_list.hpp index 4c87ccf4..f83827ee 100644 --- a/include/internal/catch_list.hpp +++ b/include/internal/catch_list.hpp @@ -68,7 +68,10 @@ namespace Catch { ++it ) { matchedTests++; TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); - Catch::cout() << testCaseInfo.name << std::endl; + if( startsWith( testCaseInfo.name, "#" ) ) + Catch::cout() << "\"" << testCaseInfo.name << "\"" << std::endl; + else + Catch::cout() << testCaseInfo.name << std::endl; } return matchedTests; }