Search in sources :

Example 11 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testModuleFromSource.

@Test
public void testModuleFromSource() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.<String>asList("--src", "test/src", "org.eclipse.ceylon.tools.test.info/1"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("Name:        org.eclipse.ceylon.tools.test.info\n" + "Version:     1\n" + "Available:   On local system\n" + "Origin:      Local source folder\n" + "Dependency Tree (up to depth 1):\n" + "  shared java.base/7\n" + "  optional java.desktop/7\n"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 12 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testAetherModuleVersionSearch.

@Test
public void testAetherModuleVersionSearch() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>singletonList("maven:asm:asm-commons/2"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().replace(System.lineSeparator(), "\n").contains("maven:asm:asm-commons/2.0\n" + "maven:asm:asm-commons/2.1\n" + "maven:asm:asm-commons/2.2\n" + "maven:asm:asm-commons/2.2.1"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 13 with CeylonInfoTool

use of org.eclipse.ceylon.tools.info.CeylonInfoTool in project ceylon by eclipse.

the class InfoToolTests method testRecursiveDependenciesOverride.

@Test
public void testRecursiveDependenciesOverride() throws Exception {
    ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
    Assert.assertNotNull(model);
    CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "--overrides", getPackagePath() + "/overrides.xml", "--show-incompatible=yes", "io.cayla.web/0.3.0"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertFalse(b.toString().contains("Dependencies version conflicts"));
}
Also used : CeylonInfoTool(org.eclipse.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Aggregations

CeylonInfoTool (org.eclipse.ceylon.tools.info.CeylonInfoTool)13 Test (org.junit.Test)13 OptionArgumentException (org.eclipse.ceylon.common.tool.OptionArgumentException)1