@@ -70,31 +70,31 @@ public void setUp() throws Exception {
7070 + " as the parent directory does not exist" );
7171 }
7272 try (BufferedOutputStream output3 =
73- new BufferedOutputStream (Files .newOutputStream (testFile1 ))) {
73+ new BufferedOutputStream (Files .newOutputStream (testFile1 ))) {
7474 TestUtils .generateTestData (output3 , testFile1Size );
7575 }
7676 if (!Files .exists (testFile2 .getParent ())) {
7777 throw new IOException ("Cannot create file " + testFile2
7878 + " as the parent directory does not exist" );
7979 }
8080 try (BufferedOutputStream output2 =
81- new BufferedOutputStream (Files .newOutputStream (testFile2 ))) {
81+ new BufferedOutputStream (Files .newOutputStream (testFile2 ))) {
8282 TestUtils .generateTestData (output2 , testFile2Size );
8383 }
8484 if (!Files .exists (testFile1 .getParent ())) {
8585 throw new IOException ("Cannot create file " + testFile1
8686 + " as the parent directory does not exist" );
8787 }
8888 try (BufferedOutputStream output1 =
89- new BufferedOutputStream (Files .newOutputStream (testFile1 ))) {
89+ new BufferedOutputStream (Files .newOutputStream (testFile1 ))) {
9090 TestUtils .generateTestData (output1 , testFile1Size );
9191 }
9292 if (!Files .exists (testFile2 .getParent ())) {
9393 throw new IOException ("Cannot create file " + testFile2
9494 + " as the parent directory does not exist" );
9595 }
9696 try (BufferedOutputStream output =
97- new BufferedOutputStream (Files .newOutputStream (testFile2 ))) {
97+ new BufferedOutputStream (Files .newOutputStream (testFile2 ))) {
9898 TestUtils .generateTestData (output , testFile2Size );
9999 }
100100 }
@@ -274,6 +274,7 @@ void testGetFullPath() {
274274 assertNull (FilenameUtils .getFullPath ("1:" ));
275275 assertNull (FilenameUtils .getFullPath ("1:a" ));
276276 assertNull (FilenameUtils .getFullPath ("///a/b/c.txt" ));
277+ assertEquals ("//a" , FilenameUtils .getFullPath ("//a" ));
277278
278279 assertEquals ("" , FilenameUtils .getFullPath ("" ));
279280
@@ -286,7 +287,6 @@ void testGetFullPath() {
286287
287288 assertEquals ("C:/" , FilenameUtils .getFullPath ("C:/" ));
288289 assertEquals ("//server/" , FilenameUtils .getFullPath ("//server/" ));
289- assertEquals ("//server" , FilenameUtils .getFullPath ("//server" ));
290290 assertEquals ("~/" , FilenameUtils .getFullPath ("~" ));
291291 assertEquals ("~/" , FilenameUtils .getFullPath ("~/" ));
292292 assertEquals ("~user/" , FilenameUtils .getFullPath ("~user" ));
@@ -407,12 +407,12 @@ void testGetPath() {
407407 assertNull (FilenameUtils .getPath ("1:" ));
408408 assertNull (FilenameUtils .getPath ("1:a" ));
409409 assertNull (FilenameUtils .getPath ("///a/b/c.txt" ));
410+ assertEquals ("" ,FilenameUtils .getPath ("//a" ));
410411
411412 assertEquals ("" , FilenameUtils .getPath ("" ));
412413 assertEquals ("" , FilenameUtils .getPath (DRIVE_C ));
413414 assertEquals ("" , FilenameUtils .getPath ("C:/" ));
414415 assertEquals ("" , FilenameUtils .getPath ("//server/" ));
415- assertEquals ("" ,FilenameUtils .getPath ("//server" ));
416416 assertEquals ("" , FilenameUtils .getPath ("~" ));
417417 assertEquals ("" , FilenameUtils .getPath ("~/" ));
418418 assertEquals ("" , FilenameUtils .getPath ("~user" ));
@@ -923,7 +923,7 @@ void testNormalize() {
923923 assertEquals (SEP + SEP + "1::" + SEP + "a" + SEP + "b" + SEP + "c.txt" , FilenameUtils .normalize ("\\ \\ 1::\\ a\\ b\\ c.txt" ));
924924 assertEquals (SEP + SEP + "server.example.org" + SEP + "a" + SEP + "b" + SEP + "c.txt" , FilenameUtils .normalize ("\\ \\ server.example.org\\ a\\ b\\ c.txt" ));
925925 assertEquals (SEP + SEP + "server.sub.example.org" + SEP + "a" + SEP + "b" + SEP + "c.txt" ,
926- FilenameUtils .normalize ("\\ \\ server.sub.example.org\\ a\\ b\\ c.txt" ));
926+ FilenameUtils .normalize ("\\ \\ server.sub.example.org\\ a\\ b\\ c.txt" ));
927927 assertEquals (SEP + SEP + "server." + SEP + "a" + SEP + "b" + SEP + "c.txt" , FilenameUtils .normalize ("\\ \\ server.\\ a\\ b\\ c.txt" ));
928928 assertEquals (SEP + SEP + "1::127.0.0.1" + SEP + "a" + SEP + "b" + SEP + "c.txt" , FilenameUtils .normalize ("\\ \\ 1::127.0.0.1\\ a\\ b\\ c.txt" ));
929929
@@ -1211,4 +1211,5 @@ void testSeparatorsToWindows() {
12111211 assertEquals ("\\ a\\ b\\ c" , FilenameUtils .separatorsToWindows ("/a/b/c" ));
12121212 assertEquals ("D:\\ a\\ b\\ c" , FilenameUtils .separatorsToWindows ("D:/a/b/c" ));
12131213 }
1214+
12141215}
0 commit comments