Fix path handling in NestedLocation on Windows

See 4b495ca
See gh-37668
This commit is contained in:
Andy Wilkinson
2023-10-20 09:15:54 +01:00
parent 3eeb1b2849
commit 4161eb1853
2 changed files with 11 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ class NestedLocationTests {
void fromUriReturnsNestedLocation() throws Exception {
File file = new File(this.temp, "test.jar");
NestedLocation location = NestedLocation
.fromUri(new URI("nested:" + file.getAbsolutePath() + "/!lib/nested.jar"));
.fromUri(new URI("nested:" + file.getAbsoluteFile().toURI().getPath() + "/!lib/nested.jar"));
assertThat(location.path()).isEqualTo(file.toPath());
assertThat(location.nestedEntryName()).isEqualTo("lib/nested.jar");
}