mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-12-02 19:22:08 +00:00
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:
1 parent
5e211fb1c4
commit
5915a968ff
1 file changed
+8
-4
@@ -38,15 +38,19 @@ public class UnreadablePackFilesTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void reportsCommentsBecauseTheLoadersCannotReadThem() throws IOException {
|
public void acceptsCommentsLikeTheLoaders() throws IOException {
|
||||||
File biome = write("biome.json", """
|
File biome = write("biome.json", """
|
||||||
{
|
{
|
||||||
// the loaders reject this
|
// line comment
|
||||||
"name": "Plains"
|
"name": "Plains", /* block comment */
|
||||||
|
"children": [
|
||||||
|
// "commented-out",
|
||||||
|
"a"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
assertEquals(1, files.recheck(List.of(biome)).size());
|
assertTrue(files.recheck(List.of(biome)).isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in new issue
Block a user