From 4accf8c296ef7a1f6bd10a90b7a06b3b499ccda6 Mon Sep 17 00:00:00 2001 From: Richard Walters Date: Mon, 12 Oct 2020 20:02:58 -0700 Subject: Fix bugs in validating numbers of IPv6 address groups --- test/src/UriTests.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/src') diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp index 6a16740..4848724 100644 --- a/test/src/UriTests.cpp +++ b/test/src/UriTests.cpp @@ -730,6 +730,8 @@ TEST(UriTests, IPv6Address) { {"http://[::1]/", "::1", true}, {"http://[::ffff:1.2.3.4]/", "::ffff:1.2.3.4", true}, {"http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/", "2001:db8:85a3:8d3:1319:8a2e:370:7348", true}, + {"http://[2001:db8:85a3:8d3:1319:8a2e:370::]/", "2001:db8:85a3:8d3:1319:8a2e:370::", true}, + {"http://[2001:db8:85a3:8d3:1319:8a2e::1]/", "2001:db8:85a3:8d3:1319:8a2e::1", true}, {"http://[fFfF::1]", "fFfF::1", true}, {"http://[1234::1]", "1234::1", true}, {"http://[fFfF:1:2:3:4:5:6:a]", "fFfF:1:2:3:4:5:6:a", true}, @@ -753,6 +755,7 @@ TEST(UriTests, IPv6Address) { {"http://::ffff:1.a.3.4]/", "", false}, {"http://[2001:db8:85a3:8d3:1319:8a2e:370:7348:0000]/", "", false}, {"http://[2001:db8:85a3:8d3:1319:8a2e:370:7348::1]/", "", false}, + {"http://[2001:db8:85a3:8d3:1319:8a2e:370::1]/", "", false}, {"http://[2001:db8:85a3::8a2e:0:]/", "", false}, {"http://[2001:db8:85a3::8a2e::]/", "", false}, {"http://[]/", "", false}, -- cgit v1.2.3