From 3453639732c924b762f4e1e7e972d782bc2a9117 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Thu, 21 Mar 2013 08:59:05 +0000 Subject: [PATCH] tags can be specified using -t (or as default command) Previously -g had to be used --- include/internal/catch_commandline.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp index f95eaca8..7558e257 100644 --- a/include/internal/catch_commandline.hpp +++ b/include/internal/catch_commandline.hpp @@ -262,8 +262,12 @@ namespace Catch { groupName += cmd[i]; } TestCaseFilters filters( groupName ); - for( std::size_t i = 0; i < cmd.argsCount(); ++i ) - filters.addFilter( TestCaseFilter( cmd[i] ) ); + for( std::size_t i = 0; i < cmd.argsCount(); ++i ) { + if( startsWith( cmd[i], "[" ) || startsWith( cmd[i], "~[" ) ) + filters.addTags( cmd[i] ); + else + filters.addFilter( TestCaseFilter( cmd[i] ) ); + } config.filters.push_back( filters ); } };