From cd1ac109d3cc409c42dd2f9ec28b0f078c67e064 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Tue, 12 Feb 2013 03:09:30 +0000 Subject: [PATCH] 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 --- .../java/org/apache/http/conn/util/TestInetAddressUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java b/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java index 54e263658..f181739cd 100644 --- a/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java +++ b/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java @@ -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