[core] Allow the use of special characters in property field names

Fixes #4336
This commit is contained in:
John Firebaugh
2016-03-23 17:15:18 -07:00
parent 6454847028
commit 2f9e6f4e94
2 changed files with 5 additions and 5 deletions

View File

@@ -39,12 +39,12 @@ TEST(Token, replaceTokens) {
if (token == "dashed-property") return "dashed";
return "";
}));
EXPECT_EQ("colonized", mbgl::util::replaceTokens("{colon:property}", [](const std::string& token) -> std::string {
if (token == "colon:property") return "colonized";
return "";
}));
EXPECT_EQ("150 m", mbgl::util::replaceTokens("{HØYDE} m", [](const std::string& token) -> std::string {
if (token == "HØYDE") return "150";
return "";
}));
EXPECT_EQ("reserved {for:future} use", mbgl::util::replaceTokens("reserved {for:future} use", [](const std::string& token) -> std::string {
if (token == "for:future") return "unknown";
return "";
}));
}