Skip to content

Commit 23585e3

Browse files
author
Vladimir Kotal
committed
use absolute path for Paths.get()
1 parent c42aa6e commit 23585e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/util/PathUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ public void tearDown() {
6464

6565
@Test
6666
public void shouldHandleSameInputs() throws IOException {
67-
final String USR_BIN = Paths.get(URI.create("file:///usr/bin")).toString();
67+
final String USR_BIN = Paths.get("/usr/bin").toString();
6868
String rel = PathUtils.getRelativeToCanonical(USR_BIN, USR_BIN);
6969
Assert.assertEquals(USR_BIN + " rel to itself", "", rel);
7070
}
7171

7272
@Test
7373
public void shouldHandleEffectivelySameInputs() throws IOException {
74-
final String USR_BIN = Paths.get(URI.create("file:///usr/bin")).toString();
74+
final String USR_BIN = Paths.get("/usr/bin").toString();
7575
String rel = PathUtils.getRelativeToCanonical(USR_BIN + File.separator, USR_BIN);
7676
Assert.assertEquals(USR_BIN + " rel to ~itself", "", rel);
7777
}

0 commit comments

Comments
 (0)