diff options
Diffstat (limited to 'test/util/url.test.cpp')
-rw-r--r-- | test/util/url.test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/util/url.test.cpp b/test/util/url.test.cpp index 55d8af2811..24697c42fa 100644 --- a/test/util/url.test.cpp +++ b/test/util/url.test.cpp @@ -6,6 +6,14 @@ using namespace mbgl::util; +TEST(URL, percentEncode) { + EXPECT_EQ("%22%C3%A9nc%C3%B8%C3%B0ing%22", percentEncode("\"éncøðing\"")); +} + +TEST(URL, percentDecode) { + EXPECT_EQ("\"éncøðing\"", percentDecode("%22%C3%A9nc%C3%B8%C3%B0ing%22")); +} + TEST(URL, Scheme) { EXPECT_EQ(URL::Segment({ 0, 4 }), URL("http://example.com/test?query=foo").scheme); EXPECT_EQ(URL::Segment({ 0, 4 }), URL("http://127.0.0.1:8080/test?query=foo").scheme); |