mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-20 07:24:16 +00:00
Isolated datapack format test
- The default forced datapack format test unbinds the platform so loader test harnesses that bind a runtime cannot change its result
This commit is contained in:
1 parent
79e7b0c79e
commit
0073002b57
1 file changed
+5
+5
@@ -58,7 +58,9 @@ import static org.mockito.Mockito.when;
|
||||
public class ModdedForcedDatapackTest {
|
||||
@Test
|
||||
public void metadataUses263DataFormat() throws IOException {
|
||||
IrisPlatform previous = IrisPlatforms.getOrNull();
|
||||
Path packDirectory = Files.createTempDirectory("iris-modded-pack-format");
|
||||
IrisPlatforms.unbind();
|
||||
try {
|
||||
ModdedForcedDatapack.writePackMeta(packDirectory);
|
||||
JSONObject pack = new JSONObject(Files.readString(packDirectory.resolve("pack.mcmeta")))
|
||||
@@ -67,6 +69,9 @@ public class ModdedForcedDatapackTest {
|
||||
assertEquals(121, pack.getInt("min_format"));
|
||||
assertEquals(121, pack.getInt("max_format"));
|
||||
} finally {
|
||||
if (previous != null) {
|
||||
IrisPlatforms.bind(previous);
|
||||
}
|
||||
deleteTree(packDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user