Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 305c2cc

Browse files
committed
Add URI regression test for combining absolute/relative URIs
1 parent 9a81f78 commit 305c2cc

File tree

1 file changed

+7
-0
lines changed
  • src/System.Private.Uri/tests/FunctionalTests

1 file changed

+7
-0
lines changed

src/System.Private.Uri/tests/FunctionalTests/UriTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,5 +889,12 @@ public static void TestGetComponentParts()
889889
s = uri.GetComponents(UriComponents.Host, UriFormat.UriEscaped);
890890
Assert.Equal(s, "www.contoso.com");
891891
}
892+
893+
[Fact]
894+
public static void TestCasingWhenCombiningAbsoluteAndRelativeUris()
895+
{
896+
Uri u = new Uri(new Uri("http://example.com/", UriKind.Absolute), new Uri("C(B:G", UriKind.Relative));
897+
Assert.Equal("http://example.com/C(B:G", u.ToString());
898+
}
892899
}
893900
}

0 commit comments

Comments
 (0)