Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed May 19, 2024
1 parent f91d537 commit eb00786
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.onthegomap.planetiler.util;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.nio.file.FileSystems;
Expand Down Expand Up @@ -42,6 +43,9 @@ void testWalkPathWithPattern() throws IOException {
var path = tmpDir.resolve("a").resolve("b").resolve("c.txt");
FileUtils.createParentDirectories(path);
Files.writeString(path, "test");
var sep = path.getFileSystem().getSeparator();
assertTrue(
path.getFileSystem().getPathMatcher("*" + sep + "*" + sep + "c.txt").matches(Path.of("a", "b", "c.txt")));
assertEquals(List.of(path), Glob.of(tmpDir).resolve("a", "*", "c.txt").find());
System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt"));
System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt").find()); // nope
Expand Down

0 comments on commit eb00786

Please sign in to comment.