use of org.eclipse.ceylon.compiler.js.CeylonRunJsTool in project ceylon by eclipse.
the class RunJsTest method testModuleLoading.
@Test
public void testModuleLoading() throws Exception {
CeylonRunJsTool runner = new CeylonRunJsTool();
runner.setModuleVersion("misc/0.1");
runner.setRun("test");
runner.setRepository(Arrays.asList(new URI(tmpModules.getAbsolutePath()), new URI("build/runtime"), new URI("build/test/proto")));
runner.run();
}
use of org.eclipse.ceylon.compiler.js.CeylonRunJsTool in project ceylon by eclipse.
the class RunJsTest method testResources.
@Test
public void testResources() throws Exception {
// Compile a module with resources
CeylonCompileJsTool compiler = new CeylonCompileJsTool();
compiler.setRepositoryAsStrings(Arrays.asList("build/runtime"));
compiler.setSource(Arrays.asList(new File("src/test/resources/doc")));
compiler.setSkipSrcArchive(true);
compiler.setResource(Arrays.asList(new File("src/test/resources/res_test")));
compiler.setModule(Arrays.asList("default"));
compiler.setOut("build/modules");
compiler.run();
// Run it, just to make sure the resources were exploded
CeylonRunJsTool runner = new CeylonRunJsTool();
runner.setModuleVersion("default");
runner.setRun("run");
runner.setRepositoryAsStrings(Arrays.asList("build/runtime", "build/modules"));
runner.run();
Assert.assertTrue("test.txt is missing", new File("build/modules/default/module-resources/test.txt").exists());
Assert.assertTrue("another_test.txt is missing", new File("build/modules/default/module-resources/another_test.txt").exists());
Assert.assertTrue("third.txt is missing", new File("build/modules/default/module-resources/subdir/third.txt").exists());
}
Aggregations