aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2018-07-04 19:58:54 -0700
committerRichard Walters <rwalters@digitalstirling.com>2018-07-04 19:58:54 -0700
commita3e4a2f10afaccab17d9d74a6d4ee3f1265208fc (patch)
treebf89bbd46f2c348fef98f38ee345b061ba2fa486 /test
parentaf8ff1ec7bc115f714bc332263c379bf9d6c650e (diff)
Normalize IPv6 addresses when generating URI strings
Diffstat (limited to 'test')
-rw-r--r--test/src/UriTests.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp
index 2e5f2d6..106aade 100644
--- a/test/src/UriTests.cpp
+++ b/test/src/UriTests.cpp
@@ -803,6 +803,9 @@ TEST(UriTests, GenerateString) {
{"http", "bob", "www.example.com", true, 8080, {"", "a c", "def"}, true, "foobar", true, "ch2", "http://bob@www.example.com:8080/a%20c/def?foobar#ch2"},
{"http", "bob", "www.example.com", true, 8080, {"", "abc", "def"}, true, "foo ar", true, "ch2", "http://bob@www.example.com:8080/abc/def?foo%20ar#ch2"},
{"http", "bob", "www.example.com", true, 8080, {"", "abc", "def"}, true, "foobar", true, "c 2", "http://bob@www.example.com:8080/abc/def?foobar#c%202"},
+
+ // normalization of IPv6 address hex digits
+ {"http", "bob", "fFfF::1", true, 8080, {"", "abc", "def"}, true, "foobar", true, "c 2", "http://bob@[ffff::1]:8080/abc/def?foobar#c%202"},
};
size_t index = 0;
for (const auto& testVector : testVectors) {