mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Fix for comma separated tags on the command line
- also added more test for tags
This commit is contained in:
		| @@ -86,7 +86,7 @@ std::string parseIntoConfigAndReturnError( const char * (&argv)[size], Catch::Co | ||||
|     return ""; | ||||
| } | ||||
|  | ||||
| inline Catch::TestCase fakeTestCase( const char* name ){ return Catch::makeTestCase( NULL, "", name, "", CATCH_INTERNAL_LINEINFO ); } | ||||
| inline Catch::TestCase fakeTestCase( const char* name, const char* desc = "" ){ return Catch::makeTestCase( NULL, "", name, desc, CATCH_INTERNAL_LINEINFO ); } | ||||
|  | ||||
| TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) { | ||||
|  | ||||
| @@ -336,6 +336,15 @@ TEST_CASE( "selftest/tags", "" ) { | ||||
|         CHECK( twoTags.matchesTags( p4 ) == true ); | ||||
|         CHECK( twoTags.matchesTags( p5 ) == true ); | ||||
|     } | ||||
|     SECTION( "complex", "" ) { | ||||
|         CHECK( fakeTestCase( "test", "[one][.]" ).matchesTags( p1 ) ); | ||||
|         CHECK_FALSE( fakeTestCase( "test", "[one][.]" ).matchesTags( p5 ) ); | ||||
|         CHECK( fakeTestCase( "test", "[three]" ).matchesTags( p4 ) ); | ||||
|         CHECK( fakeTestCase( "test", "[three]" ).matchesTags( p5 ) ); | ||||
|         CHECK( fakeTestCase( "test", "[three]" ).matchesTags( "[three]~[one]" ) ); | ||||
|         CHECK( fakeTestCase( "test", "[unit][not_apple]" ).matchesTags( "[unit]" ) ); | ||||
|         CHECK_FALSE( fakeTestCase( "test", "[unit][not_apple]" ).matchesTags( "[unit]~[not_apple]" ) ); | ||||
|     } | ||||
|  | ||||
|     SECTION( "one tag with characters either side", "" ) { | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash