Skip to content

Commit 74767ef

Browse files
committed
Fix ModuleCandidate test failure for Windows
1 parent 516d8d4 commit 74767ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/utils/ModuleDiscovererTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,12 @@ void candidatesHaveExpectedToStringRepresentation() {
278278

279279
// Then
280280
assertThat(candidate)
281-
.hasToString("ModuleCandidate{name=\"%s\", path=\"%s\"}", name, path);
281+
.hasToString(
282+
"ModuleCandidate{name=\"%s\", path=\"%s\"}",
283+
name,
284+
// Replace handles string escaping on Windows paths
285+
path.toString().replace("\\", "\\\\")
286+
);
282287
}
283288
}
284289
}

0 commit comments

Comments
 (0)