Skip to content

Commit

Permalink
Fix normalizePath test on Windows OS
Browse files Browse the repository at this point in the history
In Windows OS test with normalizePath failed. This PR should fix it.
  • Loading branch information
angelozerr authored and fbricon committed May 28, 2019
1 parent c914529 commit e2a702a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public void testFilesCachePathPreference() throws Exception {
@Test
public void normalizePathTest() {
assertEquals(Paths.get(System.getProperty("user.home"), "Test", "Folder").toString(), FilesUtils.normalizePath("~/Test/Folder"));
assertEquals(Paths.get(separator, "Test", "~", "Folder").toString(), FilesUtils.normalizePath("/Test/~/Folder"));
assertEquals(Paths.get(separator + "Test", "~", "Folder").toString(), FilesUtils.normalizePath("/Test/~/Folder"));
assertEquals(Paths.get("~", "Test", "Folder").toString(), FilesUtils.normalizePath("./~/Test/Folder"));
assertEquals(Paths.get(separator, "Folder").toString(), FilesUtils.normalizePath("/Test/../Folder"));
assertEquals(Paths.get(separator, "Users", "Nikolas").toString(), FilesUtils.normalizePath("\\Users\\Nikolas\\"));
assertEquals(Paths.get(separator + "Folder").toString(), FilesUtils.normalizePath("/Test/../Folder"));
assertEquals(Paths.get(separator + "Users", "Nikolas").toString(), FilesUtils.normalizePath("\\Users\\Nikolas\\"));
}
}
}

0 comments on commit e2a702a

Please sign in to comment.