Fix test tag parsing to split [.foo] into [.][foo]

This commit is contained in:
Martin Hořeňovský
2019-03-29 10:48:56 +01:00
parent 54089c4c8c
commit b77cec05c0
8 changed files with 76 additions and 41 deletions

View File

@@ -40,3 +40,8 @@ TEST_CASE( "Tag alias can be registered against tag patterns" ) {
CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) );
}
}
TEST_CASE("shortened hide tags are split apart") {
auto testcase = Catch::makeTestCase(nullptr, "", {"fake test name", "[.magic-tag]"}, CATCH_INTERNAL_LINEINFO);
REQUIRE_THAT(testcase.tags, Catch::VectorContains(std::string("magic-tag")) && Catch::VectorContains(std::string(".")));
}