From 09b724ea3362cafb302307d311553374e7aafc75 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 27 Nov 2019 15:56:03 +0200 Subject: [PATCH] [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`. --- render-test/parser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/render-test/parser.cpp b/render-test/parser.cpp index b5f4f9e75..093d4b37f 100644 --- a/render-test/parser.cpp +++ b/render-test/parser.cpp @@ -289,17 +289,17 @@ std::vector readExpectedEntries(const std::regex& regex, const mbgl } // namespace std::vector 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 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 readExpectedJSONEntries(const mbgl::filesystem::path& base) { - static const std::regex regex(".*expected.*.json"); + static const std::regex regex(".*/expected.*.json"); return readExpectedEntries(regex, base); }