@throws Exception if the test fails
()
| 444 | * @throws Exception if the test fails |
| 445 | */ |
| 446 | @Test |
| 447 | public void percent() throws Exception { |
| 448 | URL url = new URL("http://localhost/bug%21.html"); |
| 449 | assertEquals("http://localhost/bug%21.html", |
| 450 | UrlUtils.encodeUrl(url, ISO_8859_1)); |
| 451 | |
| 452 | url = new URL("http://localhost/bug%0F.html"); |
| 453 | assertEquals("http://localhost/bug%0F.html", |
| 454 | UrlUtils.encodeUrl(url, ISO_8859_1)); |
| 455 | |
| 456 | url = new URL("http://localhost/bug%ff.html"); |
| 457 | assertEquals("http://localhost/bug%ff.html", |
| 458 | UrlUtils.encodeUrl(url, ISO_8859_1)); |
| 459 | |
| 460 | url = new URL("http://localhost/bug%AB.html"); |
| 461 | assertEquals("http://localhost/bug%AB.html", |
| 462 | UrlUtils.encodeUrl(url, ISO_8859_1)); |
| 463 | |
| 464 | url = new URL("http://john.smith:secret@localhost/bug%AB.html"); |
| 465 | assertEquals("http://john.smith:secret@localhost/bug%AB.html", |
| 466 | UrlUtils.encodeUrl(url, ISO_8859_1)); |
| 467 | } |
| 468 | |
| 469 | /** |
| 470 | * Tests for #1587. |
nothing calls this directly
no test coverage detected