Expect the hotload guard to accept commented pack files

VolmLib's JSONTokener now skips comments, so the guard and the loaders
read them the same way.
This commit is contained in:
piexel committed 2026-11-11 15:51:17 +01:00
1 parent 5e211fb1c4
commit 5915a968ff
1 file changed
+8 -4
@@ -38,15 +38,19 @@ public class UnreadablePackFilesTest {
}
@Test
public void reportsCommentsBecauseTheLoadersCannotReadThem() throws IOException {
public void acceptsCommentsLikeTheLoaders() throws IOException {
File biome = write("biome.json", """
{
// the loaders reject this
"name": "Plains"
// line comment
"name": "Plains", /* block comment */
"children": [
// "commented-out",
"a"
]
}
""");
assertEquals(1, files.recheck(List.of(biome)).size());
assertTrue(files.recheck(List.of(biome)).isEmpty());
}
@Test