Search in sources :

Example 11 with CeylonInfoTool

use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.

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("asm:asm-commons/2"));
    StringBuilder b = new StringBuilder();
    tool.setOut(b);
    tool.run();
    Assert.assertTrue(b.toString().contains("asm:asm-commons/2.0\n" + "asm:asm-commons/2.1\n" + "asm:asm-commons/2.2\n" + "asm:asm-commons/2.2.1"));
}
Also used : CeylonInfoTool(com.redhat.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Example 12 with CeylonInfoTool

use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.

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(com.redhat.ceylon.tools.info.CeylonInfoTool) Test(org.junit.Test)

Aggregations

CeylonInfoTool (com.redhat.ceylon.tools.info.CeylonInfoTool)12 Test (org.junit.Test)12 OptionArgumentException (com.redhat.ceylon.common.tool.OptionArgumentException)1