You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2026/08/04 12:16:48 UTC
(commons-vfs) 01/02: Sort members
This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit 01d9e85826c5b8628d1df5130d171ace6e389e01
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 4 08:16:10 2026 -0400
Sort members
---
.../commons/vfs2/provider/UriParserTest.java | 28 +++++++++++-----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/UriParserTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/UriParserTest.java
index 4508ec1b7..ea4340067 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/UriParserTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/UriParserTest.java
@@ -56,6 +56,13 @@ public class UriParserTest {
assertEquals("file", UriParser.extractScheme(schemes, "file:user/subdir/some/path/some:file"));
}
+ @Test
+ public void testDecodeAcceptsAsciiHexDigits() throws FileSystemException {
+ // Valid ASCII escapes still decode, both letter cases.
+ assertEquals("../", UriParser.decode("%2e%2E%2f"));
+ assertEquals("Az", UriParser.decode("%41%7a"));
+ }
+
@Test
public void testDecodePercentInsideBracketsAfterDoubleSlashInPath() throws FileSystemException {
assertEquals("file:/a//[inside%text]",
@@ -77,10 +84,13 @@ public class UriParserTest {
}
@Test
- public void testDecodeAcceptsAsciiHexDigits() throws FileSystemException {
- // Valid ASCII escapes still decode, both letter cases.
- assertEquals("../", UriParser.decode("%2e%2E%2f"));
- assertEquals("Az", UriParser.decode("%41%7a"));
+ public void testDecodePreservesPercentInsideIPv6Host() throws FileSystemException {
+ assertEquals("ftp://[fe80::1%25eth0]/path",
+ UriParser.decode("ftp://[fe80::1%25eth0]/path"));
+ assertEquals("//[fe80::1%25eth0]/path",
+ UriParser.decode("//[fe80::1%25eth0]/path"));
+ assertEquals("ftp://[fe80::1%25eth0]/[dir%name]",
+ UriParser.decode("ftp://[fe80::1%25eth0]/[dir%25name]"));
}
@Test
@@ -92,16 +102,6 @@ public class UriParserTest {
assertThrows(FileSystemException.class, () -> UriParser.decode("%٥5"));
}
- @Test
- public void testDecodePreservesPercentInsideIPv6Host() throws FileSystemException {
- assertEquals("ftp://[fe80::1%25eth0]/path",
- UriParser.decode("ftp://[fe80::1%25eth0]/path"));
- assertEquals("//[fe80::1%25eth0]/path",
- UriParser.decode("//[fe80::1%25eth0]/path"));
- assertEquals("ftp://[fe80::1%25eth0]/[dir%name]",
- UriParser.decode("ftp://[fe80::1%25eth0]/[dir%25name]"));
- }
-
@Test
public void testIPv6CheckUriEncoding() throws FileSystemException {
UriParser.checkUriEncoding("http://[fe80::14b5:1204:5410:64ca%en1]:8080");