-------------------------------------------------------------------------
| 53 | |
| 54 | //------------------------------------------------------------------------- |
| 55 | TEST(PathMatcherTest, PostFixBasicMatch) |
| 56 | { |
| 57 | std::vector<std::wstring> filenames = { L"Test.txt", L"Test\\Test2.txt" }; |
| 58 | auto files = ToFiles(filenames); |
| 59 | PathMatcher pathMatcher{std::move(files), boost::none }; |
| 60 | |
| 61 | ASSERT_EQ(filenames.at(0), Match(pathMatcher, "Test.txt")); |
| 62 | ASSERT_EQ(filenames.at(1), Match(pathMatcher, "Test\\Test\\Test2.txt")); |
| 63 | ASSERT_EQ(filenames.at(1), Match(pathMatcher, "test\\test\\test2.txt")); |
| 64 | |
| 65 | ASSERT_EQ(nullptr, pathMatcher.Match("Test2\\Test2.txt")); |
| 66 | ASSERT_EQ(nullptr, pathMatcher.Match("Test2.txt")); |
| 67 | ASSERT_EQ(nullptr, pathMatcher.Match("Test3.txt")); |
| 68 | ASSERT_EQ(0, pathMatcher.GetUnmatchedPaths().size()); |
| 69 | } |
| 70 | |
| 71 | //------------------------------------------------------------------------- |
| 72 | TEST(PathMatcherTest, PostFixAmgigousPath) |
nothing calls this directly
no test coverage detected