[render-test] Fix regex matching the directory name

This code was matching `style.json` instead of `metrics.json` if
the `style.json` was contained inside `metrics/.../style.json`.
This commit is contained in:
Thiago Marcos P. Santos
2019-11-27 15:56:03 +02:00
parent 2a65301f09
commit 09b724ea33

View File

@@ -289,17 +289,17 @@ std::vector<std::string> readExpectedEntries(const std::regex& regex, const mbgl
} // namespace
std::vector<std::string> readExpectedImageEntries(const mbgl::filesystem::path& base) {
static const std::regex regex(".*expected.*.png");
static const std::regex regex(".*/expected.*.png");
return readExpectedEntries(regex, base);
}
std::vector<std::string> readExpectedMetricEntries(const mbgl::filesystem::path& base) {
static const std::regex regex(".*metrics.*.json");
static const std::regex regex(".*/metrics.*.json");
return readExpectedEntries(regex, base);
}
std::vector<std::string> readExpectedJSONEntries(const mbgl::filesystem::path& base) {
static const std::regex regex(".*expected.*.json");
static const std::regex regex(".*/expected.*.json");
return readExpectedEntries(regex, base);
}