Test for ~ and removed debug print

This commit is contained in:
Phil Nash
2012-08-24 19:01:35 +01:00
parent f82861fb0a
commit 95ae50ad3d
3 changed files with 10 additions and 3 deletions

View File

@@ -137,6 +137,15 @@ TEST_CASE( "selftest/parser/2", "ConfigData" ) {
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "alwaysIncluded" ) ) );
}
SECTION( "--test/exclude:2", "Specify one test case exclusion using --test ~" ) {
const char* argv[] = { "test", "--test", "~test1" };
CHECK_NOTHROW( parseIntoConfig( argv, config ) );
REQUIRE( config.filters.size() == 1 );
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "test1" ) ) == false );
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "alwaysIncluded" ) ) );
}
SECTION( "-t/2", "Specify two test cases using -t" ) {
const char* argv[] = { "test", "-t", "test1", "test2" };
CHECK_NOTHROW( parseIntoConfig( argv, config ) );