update new sdk

This commit is contained in:
August 2020-07-15 19:27:51 +08:00
parent f33907443a
commit 744c72c133
1643 changed files with 83006 additions and 28021 deletions

View file

@ -409,6 +409,26 @@ public final class URLTest extends TestCase {
assertEquals("http://host/a/c", url.toString()); // RI doesn't canonicalize
}
public void testPathContainsBackslash() throws Exception {
URL url = new URL("http://host\\path@foo");
assertEquals("\\path@foo", url.getPath());
assertEquals("host", url.getHost());
}
public void testQueryContainsForwardSlash() throws Exception {
URL url = new URL("http://host?query/foo");
assertEquals("", url.getPath());
assertEquals("host", url.getHost());
assertEquals("query/foo", url.getQuery());
}
public void testFragmentContainsForwardSlash() throws Exception {
URL url = new URL("http://host#fragment/foo");
assertEquals("", url.getPath());
assertEquals("host", url.getHost());
assertEquals("fragment/foo", url.getRef());
}
public void testRelativePathAndFragment() throws Exception {
URL base = new URL("http://host/file");
assertEquals("http://host/another#fragment", new URL(base, "another#fragment").toString());