--- old/test/jdk/nio/zipfs/PathOps.java 2017-01-18 10:35:10.946442985 -0800 +++ new/test/jdk/nio/zipfs/PathOps.java 2017-01-18 10:35:10.643444117 -0800 @@ -180,6 +180,13 @@ return this; } + PathOps resolvePath(String other, String expected) { + out.format("test resolve %s\n", other); + checkPath(); + check(path.resolve(fs.getPath(other)), expected); + return this; + } + PathOps resolveSibling(String other, String expected) { out.format("test resolveSibling %s\n", other); checkPath(); @@ -384,6 +391,30 @@ .resolve("", "") .resolve("foo", "foo") .resolve("/foo", "/foo"); + test("/") + .resolve("", "/") + .resolve("foo", "/foo") + .resolve("/foo", "/foo") + .resolve("/foo/", "/foo"); + + // resolve(Path) + test("/tmp") + .resolvePath("foo", "/tmp/foo") + .resolvePath("/foo", "/foo") + .resolvePath("", "/tmp"); + test("tmp") + .resolvePath("foo", "tmp/foo") + .resolvePath("/foo", "/foo") + .resolvePath("", "tmp"); + test("") + .resolvePath("", "") + .resolvePath("foo", "foo") + .resolvePath("/foo", "/foo"); + test("/") + .resolvePath("", "/") + .resolvePath("foo", "/foo") + .resolvePath("/foo", "/foo") + .resolvePath("/foo/", "/foo"); // resolveSibling test("foo")