use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.
the class RunToolTestCase method testDefaultArg.
@Test
public void testDefaultArg() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("default", "Tako"));
assertOutput(tool, OUT_EXPECTED_WITH_ARG);
}
use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.
the class RunToolTestCase method testModuleVersionArgs.
@Test
public void testModuleVersionArgs() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("hello/1.0.0", "Tako"));
assertOutput(tool, OUT_EXPECTED_WITH_ARG);
}
use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.
the class RunToolTestCase method testModuleVersionFunction.
@Test
public void testModuleVersionFunction() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--run=hello.hello", "hello/1.0.0"));
assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.
the class RunToolTestCase method testDefault.
@Test
public void testDefault() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("default"));
assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.
the class RunToolTestCase method testCompileForce.
@Test
public void testCompileForce() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--offline", "--rep", "build/test/modules", "--compile=force", "--compiler-arguments=--sysrep", "--compiler-arguments=../dist/dist/repo", "--compiler-arguments=--offline", "--compiler-arguments=--source", "--compiler-arguments=testsuite/src/test/resources/source", "--compiler-arguments=--out", "--compiler-arguments=build/test/modules", "bug7035/1"));
tool.run();
// run it again, should force
tool = pluginFactory.bindArguments(model, getMainTool(), options("--offline", "--rep", "build/test/modules", "--compile=force", "--compiler-arguments=--sysrep", "--compiler-arguments=../dist/dist/repo", "--compiler-arguments=--offline", "--compiler-arguments=--source", "--compiler-arguments=testsuite/src/test/resources/source", "--compiler-arguments=--out", "--compiler-arguments=build/test/modules", "bug7035/1"));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream out = new PrintStream(baos);
tool.setOut(out);
tool.run();
assertTrue(baos.size() > 0);
assertTrue(baos.toString().contains("Source found for module bug7035, compiling..."));
}
Aggregations