Fix reachability argfile format

Update the argfile to a format that actually works when
passed to the `native-image` command.

See gh-32738
This commit is contained in:
Phillip Webb
2022-10-17 18:58:42 -07:00
parent a8e701cee2
commit c16c6bc3b5
4 changed files with 10 additions and 12 deletions

View File

@@ -643,11 +643,11 @@ abstract class AbstractPackagerTests<P extends Packager> {
List<String> expected = new ArrayList<>();
expected.add("--exclude-config");
expected.add("\"\\\\Q" + libraryOne.getName() + "\\\\E\"");
expected.add("\"^/META-INF/native-image/.*\"");
expected.add("\\Q" + libraryOne.getName() + "\\E");
expected.add("^/META-INF/native-image/.*");
expected.add("--exclude-config");
expected.add("\"\\\\Q" + libraryTwo.getName() + "\\\\E\"");
expected.add("\"^/META-INF/native-image/.*\"");
expected.add("\\Q" + libraryTwo.getName() + "\\E");
expected.add("^/META-INF/native-image/.*");
assertThat(getPackagedEntryContent("META-INF/native-image/argfile"))
.isEqualTo(expected.stream().collect(Collectors.joining("\n")) + "\n");
}