This commit is contained in:
Looly
2020-09-23 12:42:55 +08:00
parent 36f7909702
commit 67aa719b3c
6 changed files with 36 additions and 11 deletions

View File

@@ -84,4 +84,11 @@ public class URLUtilTest {
String encode2 = URLUtil.encodeQuery(body);
Assert.assertEquals("366466+-+%E5%89%AF%E6%9C%AC.jpg", encode2);
}
@Test
public void getPathTest(){
String url = " http://www.aaa.bbb/search?scope=ccc&q=ddd";
String path = URLUtil.getPath(url);
Assert.assertEquals("/search", path);
}
}