diff --git a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs index ede268af38ef..4baf57e0e3c6 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs @@ -346,9 +346,6 @@ public void TryParseIPv6_ValidAddress_RoundtripMatchesExpected(string address, s public static IEnumerable InvalidIpv6Addresses() { - yield return new object[] { "" }; // malformed - yield return new object[] { "[" }; // malformed - yield return new object[] { "[]" }; // malformed yield return new object[] { "[:]" }; // malformed yield return new object[] { ":::4df" }; yield return new object[] { "4df:::" }; @@ -442,6 +439,9 @@ public void ParseIPv6_InvalidAddress_ThrowsFormatException(string invalidAddress new object[] { "%12" }, // just scope new object[] { "[192.168.0.1]" }, // raw v4 new object[] { "[1]" }, // incomplete + new object[] { "" }, // malformed + new object[] { "[" }, // malformed + new object[] { "[]" }, // malformed }; [Theory] diff --git a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs index 061b31bee0f1..f188ae495103 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs @@ -647,6 +647,7 @@ public static IEnumerable Iri_ExpandingContents_TooLong [Theory] [MemberData(nameof(Iri_ExpandingContents_TooLong))] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")] public static void Iri_ExpandingContents_ThrowsIfTooLong(string input) { Assert.Throws(() => { Uri itemUri = new Uri(input); }); diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs index 8641fed7a940..2f952f89ec52 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs @@ -321,7 +321,6 @@ public void UriIPv6Host_EmbeddedIPv4_Success(string address, string expected) [InlineData(":1:2:3:4:5")] // leading single colon [InlineData(":1:2:3:4:5:6")] // leading single colon [InlineData(":1:2:3:4:5:6:7")] // leading single colon - [InlineData(":1:2:3:4:5:6:7:8")] // leading single colon [InlineData(":1:2:3:4:5:6:7:8:9")] // leading single colon [InlineData("::1:2:3:4:5:6:7:8")] // compressor with too many number groups [InlineData("1::2:3:4:5:6:7:8")] // compressor with too many number groups @@ -352,6 +351,14 @@ public void UriIPv6Host_BadAddress(string address) ParseBadIPv6Address(address); } + [Theory] + [InlineData(":1:2:3:4:5:6:7:8")] // leading single colon + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework machines are not yet patched with the fix for this")] + public void UriIPv6Host_BadAddress_SkipOnFramework(string address) + { + ParseBadIPv6Address(address); + } + #region Helpers private void ParseIPv6Address(string ipv6String)