use of org.eclipse.ceylon.compiler.js.CeylonCompileJsTool in project ceylon by eclipse.
the class CompileJsToolTest method testModuleTwice.
@Test
public void testModuleTwice() throws Exception {
FileUtil.delete(new File("build/test-modules"));
ToolModel<CeylonCompileJsTool> tool = pluginLoader.loadToolModel("compile-js");
Assert.assertNotNull(tool);
CeylonCompileJsTool jsc = pluginFactory.bindArguments(tool, getMainTool(), args("--source=src/test/resources/loader/pass1", "--resource=src/test/resources/res_test", "m1"));
jsc.run();
jsc.run();
checkCompilerResult("build/test-modules/m1/0.1", "m1-0.1");
checkResources("build/test-modules/m1/0.1", "m1-0.1", "m1root.txt", "m1/m1res.txt", "m1/ALTROOT/altrootm1.txt");
checkExcludedResources("build/test-modules/m1/0.1", "m1-0.1", "test.txt", "another_test.txt", "subdir/third.txt", "ROOT/inroot.txt", "ALTROOT/altroot.txt");
}
use of org.eclipse.ceylon.compiler.js.CeylonCompileJsTool in project ceylon by eclipse.
the class CompileJsToolTest method testDefaultSourceNoResources.
@Test
public void testDefaultSourceNoResources() throws Exception {
FileUtil.delete(new File("build/test-modules"));
ToolModel<CeylonCompileJsTool> tool = pluginLoader.loadToolModel("compile-js");
Assert.assertNotNull(tool);
CeylonCompileJsTool jsc = pluginFactory.bindArguments(tool, getMainTool(), args("--source=src/test/resources/doc", "--resource=src/test/resources/res_test", "src/test/resources/doc/calls.ceylon"));
jsc.run();
checkCompilerResult("build/test-modules/default", "default");
checkNoResources("build/test-modules/default", "default");
}
use of org.eclipse.ceylon.compiler.js.CeylonCompileJsTool in project ceylon by eclipse.
the class CompileJsToolTest method testDefaultSourceInvalidResource1.
@Test(expected = ToolUsageError.class)
public void testDefaultSourceInvalidResource1() throws Exception {
FileUtil.delete(new File("build/test-modules"));
ToolModel<CeylonCompileJsTool> tool = pluginLoader.loadToolModel("compile-js");
Assert.assertNotNull(tool);
CeylonCompileJsTool jsc = pluginFactory.bindArguments(tool, getMainTool(), args("--source=src/test/resources/doc", "--resource=src/test/resources/res_test", "src/test/resources/doc/calls.ceylon", "src/test/resources/res_test/invalid.txt"));
jsc.run();
}
use of org.eclipse.ceylon.compiler.js.CeylonCompileJsTool in project ceylon by eclipse.
the class CompileJsToolTest method testDefaultInvalidSourceValidResource1.
@Test(expected = ToolUsageError.class)
public void testDefaultInvalidSourceValidResource1() throws Exception {
FileUtil.delete(new File("build/test-modules"));
ToolModel<CeylonCompileJsTool> tool = pluginLoader.loadToolModel("compile-js");
Assert.assertNotNull(tool);
CeylonCompileJsTool jsc = pluginFactory.bindArguments(tool, getMainTool(), args("--source=src/test/resources/doc", "--resource=src/test/resources/res_test", "src/test/resources/doc/invalid.ceylon", "src/test/resources/res_test/test.txt"));
jsc.run();
}
use of org.eclipse.ceylon.compiler.js.CeylonCompileJsTool in project ceylon by eclipse.
the class CompileJsToolTest method testModuleFileDefaultResourceFile.
@Test
public void testModuleFileDefaultResourceFile() throws Exception {
FileUtil.delete(new File("build/test-modules"));
ToolModel<CeylonCompileJsTool> tool = pluginLoader.loadToolModel("compile-js");
Assert.assertNotNull(tool);
CeylonCompileJsTool jsc = pluginFactory.bindArguments(tool, getMainTool(), args("--source=src/test/resources/loader/pass1", "--resource=src/test/resources/res_test", "src/test/resources/loader/pass1/m1/test.ceylon", "src/test/resources/loader/pass1/m1/module.ceylon", "src/test/resources/loader/pass1/m1/package.ceylon", "src/test/resources/res_test/test.txt"));
jsc.run();
checkCompilerResult("build/test-modules/m1/0.1", "m1-0.1");
checkNoResources("build/test-modules/m1/0.1", "m1-0.1");
checkResources("build/test-modules/default", "default", "test.txt");
checkExcludedResources("build/test-modules/default", "default", "another_test.txt");
}
Aggregations