Add tests to show compressed IPv6 addresses cannot have too many leading or trailing fields
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1445023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c29390b4dc
commit
cd1ac109d3
|
@ -69,6 +69,8 @@ public class TestInetAddressUtils {
|
|||
Assert.assertFalse(InetAddressUtils.isIPv6StdAddress("0:0:0:0:0:0:0")); // Too few
|
||||
Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress(":1"));
|
||||
Assert.assertFalse(InetAddressUtils.isIPv6Address("2001:0db8::0000::57ab")); // Cannot have two contractions
|
||||
Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress("1:2:3:4:5:6:7::9")); // too many fields before ::
|
||||
Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress("::3:4:5:6:7:8:9")); // too many fields after ::
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue