Search in sources :

Example 6 with CeylonSrcTool

use of org.eclipse.ceylon.tools.src.CeylonSrcTool in project ceylon by eclipse.

the class SrcToolTests method testUnpackingCwd.

@Test
public void testUnpackingCwd() throws Exception {
    compile("src_tool_test/module.ceylon", "src_tool_test/package.ceylon", "src_tool_test/foo.ceylon");
    ToolModel<CeylonSrcTool> model = pluginLoader.loadToolModel("src");
    Assert.assertNotNull(model);
    CeylonSrcTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.<String>asList("--cacherep", removeRoot(getCachePath()), "--rep", removeRoot(getOutPath()), "--cwd", "build", "--src", "test-source2", "org.eclipse.ceylon.tools.test.test_mod_source.src_tool_test/1.0.0"));
    tool.run();
    String path = "build/test-source2/org/eclipse/ceylon/tools/test/test_mod_source/src_tool_test";
    File dir = new File(path);
    Assert.assertTrue(dir.isDirectory());
    File moduleFile = new File(dir, "module.ceylon");
    Assert.assertTrue(moduleFile.isFile());
    File packageFile = new File(dir, "package.ceylon");
    Assert.assertTrue(packageFile.isFile());
    File fooFile = new File(dir, "foo.ceylon");
    Assert.assertTrue(fooFile.isFile());
}
Also used : CeylonSrcTool(org.eclipse.ceylon.tools.src.CeylonSrcTool) File(java.io.File) Test(org.junit.Test)

Aggregations

CeylonSrcTool (org.eclipse.ceylon.tools.src.CeylonSrcTool)6 Test (org.junit.Test)6 File (java.io.File)2 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1