failing test for suppression glob

This commit is contained in:
Greg Hewgill 2011-02-08 21:44:59 +13:00
parent 1e0d538273
commit 38986302e9
1 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,7 @@ private:
TEST_CASE(suppressionsBadId1); TEST_CASE(suppressionsBadId1);
TEST_CASE(suppressionsDosFormat); // Ticket #1836 TEST_CASE(suppressionsDosFormat); // Ticket #1836
TEST_CASE(suppressionsFileNameWithColon); // Ticket #1919 - filename includes colon TEST_CASE(suppressionsFileNameWithColon); // Ticket #1919 - filename includes colon
TEST_CASE(suppressionsGlob);
} }
void suppressionsBadId1() void suppressionsBadId1()
@ -63,6 +64,15 @@ private:
ASSERT_EQUALS(false, suppressions.isSuppressed("errorid", "c:\\bar.cpp", 10)); ASSERT_EQUALS(false, suppressions.isSuppressed("errorid", "c:\\bar.cpp", 10));
ASSERT_EQUALS(true, suppressions.isSuppressed("errorid", "c:\\bar.cpp", 12)); ASSERT_EQUALS(true, suppressions.isSuppressed("errorid", "c:\\bar.cpp", 12));
} }
void suppressionsGlob()
{
Settings::Suppressions suppressions;
std::istringstream s("error:x*.cpp\n");
ASSERT_EQUALS("", suppressions.parseFile(s));
ASSERT_EQUALS(true, suppressions.isSuppressed("errorid", "xyz.cpp", 1));
ASSERT_EQUALS(false, suppressions.isSuppressed("errorid", "abc.cpp", 1));
}
}; };
REGISTER_TEST(TestSettings) REGISTER_TEST(TestSettings)