Search in sources :

Example 1 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testModuleNoVersion.

@Test
public void testModuleNoVersion() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("hello"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 2 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testQuotedModuleNameVersion.

@Test
public void testQuotedModuleNameVersion() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--run=foo.long.module::run", "foo.long.module/1.0.0"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 3 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testDefaultFunction.

@Test
public void testDefaultFunction() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--run=hello", "default"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 4 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testQuotedModuleNameKeywordFunction.

@Test
public void testQuotedModuleNameKeywordFunction() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("--run", "foo.long.module::do", "foo.long.module/1.0.0"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Example 5 with CeylonRunTool

use of ceylon.modules.bootstrap.CeylonRunTool in project ceylon by eclipse.

the class RunToolTestCase method testQuotedModuleName.

@Test
public void testQuotedModuleName() throws Exception {
    ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
    Assert.assertNotNull(model);
    CeylonRunTool tool = pluginFactory.bindArguments(model, getMainTool(), options("foo.long.module/1.0.0"));
    assertOutput(tool, OUT_EXPECTED_DEFAULT);
}
Also used : CeylonRunTool(ceylon.modules.bootstrap.CeylonRunTool) Test(org.junit.Test) AbstractToolTest(org.eclipse.ceylon.common.tool.AbstractToolTest)

Aggregations

CeylonRunTool (ceylon.modules.bootstrap.CeylonRunTool)14 AbstractToolTest (org.eclipse.ceylon.common.tool.AbstractToolTest)14 Test (org.junit.Test)14 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1