Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed May 19, 2024
1 parent 626bc10 commit 825ae04
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ void testParsePathWithPattern(String input, String base, String pattern) {
var separator = FileSystems.getDefault().getSeparator();
input = input.replace("/", separator);
base = base == null ? "" : base.replace("/", separator);
pattern = pattern == null ? null : pattern.replace("/", separator);
assertEquals(
new Glob(Path.of(base), pattern),
Glob.parse(input)
Expand All @@ -50,11 +49,10 @@ void testWalkPathWithPattern() throws IOException {
@Test
void testResolve() {
var base = Glob.of(Path.of("a", "b"));
var separator = base.base().getFileSystem().getSeparator();
assertEquals(new Glob(Path.of("a", "b", "c"), null), base.resolve("c"));
assertEquals(new Glob(Path.of("a", "b", "c", "d"), null), base.resolve("c", "d"));
assertEquals(new Glob(Path.of("a", "b"), "*" + separator + "d"), base.resolve("*", "d"));
assertEquals(new Glob(tmpDir, String.join(separator, "*", "*", "c.txt")),
assertEquals(new Glob(Path.of("a", "b"), "*/d"), base.resolve("*", "d"));
assertEquals(new Glob(tmpDir, "*/*/c.txt"),
Glob.of(tmpDir).resolve("*", "*", "c.txt"));
}

Expand Down

0 comments on commit 825ae04

Please sign in to comment.