test/jdk/nio/zipfs/PathOps.java
Print this page
*** 178,187 ****
--- 178,194 ----
checkPath();
check(path.resolve(other), expected);
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();
check(path.resolveSibling(other), expected);
return this;
*** 382,391 ****
--- 389,422 ----
.resolve("", "tmp");
test("")
.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")
.resolveSibling("bar", "bar")
.resolveSibling("/bar", "/bar")