diff --git a/src/main/java/org/eolang/jucs/JucsProvider.java b/src/main/java/org/eolang/jucs/JucsProvider.java index 5056d70..2f0f24c 100644 --- a/src/main/java/org/eolang/jucs/JucsProvider.java +++ b/src/main/java/org/eolang/jucs/JucsProvider.java @@ -90,7 +90,7 @@ private Collection yamls(final String prefix) { ); final String[] subs = folder.split("\n"); for (final String sub : subs) { - final Path path = Paths.get(String.format("/%s%s", prefix, sub)); + final Path path = Paths.get(String.format("%s%s", prefix, sub)); if (matcher.matches(path)) { out.add(String.format("%s/%s", home, sub)); } else if (!JucsProvider.IS_FILE.matcher(sub).matches()) { diff --git a/src/test/java/org/eolang/jucs/JucsProviderTest.java b/src/test/java/org/eolang/jucs/JucsProviderTest.java index 8fb3bf3..bfcd55b 100644 --- a/src/test/java/org/eolang/jucs/JucsProviderTest.java +++ b/src/test/java/org/eolang/jucs/JucsProviderTest.java @@ -46,9 +46,15 @@ void findsInFolders(final String file) { } @ParameterizedTest - @ClasspathSource(value = "com/yegor256/jucs/bar", glob = "**/*.text") + @ClasspathSource(value = "com/yegor256/jucs/bar", glob = "**.text") void findsWithBigGlob(final String file) { Assertions.assertEquals(file, "hey!\n"); } + @ParameterizedTest + @ClasspathSource(value = "com/yegor256/jucs/bar", glob = "*.text") + void findsWithLocalGlob(final String file) { + Assertions.assertEquals(file, "hey!\n"); + } + }