Holy Moly, it's a big fat commit of broken code!

This commit is contained in:
cpw authored and LexManos committed 2018-09-05 11:16:33 -07:00
1 parent 5b05e103f4
commit c1f0e1b68f
63 files changed
+2027 -542

No files matched your search

@@ -0,0 +1,37 @@
package net.minecraftforge.fml.test;
import net.minecraftforge.fml.loading.moddiscovery.ModFile;
import net.minecraftforge.fml.loading.moddiscovery.ModFileParser;
import org.junit.Test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.jar.JarFile;
public class ModsTomlTest
{
@Test
public void testTomlLoad() throws URISyntaxException
{
final URL resource = getClass().getClassLoader().getResource("mods.toml");
final Path path = Paths.get(resource.toURI());
final ModFile.ModFileInfo modFileInfo = ModFileParser.loadModFile(null, path);
modFileInfo.getMods();
}
@Test
public void testTomlInJar() throws URISyntaxException, IOException
{
final URL resource = getClass().getClassLoader().getResource("mod.jar");
final FileSystem fileSystem = FileSystems.newFileSystem(Paths.get(resource.toURI()), getClass().getClassLoader());
final Path path = fileSystem.getPath("META-INF", "mods.toml");
ModFileParser.loadModFile(null, path);
}
}