Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ public void TryParseIPv6_ValidAddress_RoundtripMatchesExpected(string address, s

public static IEnumerable<object[]> 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:::" };
Expand Down Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions src/System.Private.Uri/tests/FunctionalTests/IriTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ public static IEnumerable<Object[]> 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<System.UriFormatException>(() => { Uri itemUri = new Uri(input); });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down