use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.
the class InfoToolTests method testAetherModule.
@Test
public void testAetherModule() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "com.sparkjava:spark-core/2.1"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().contains("Dependencies (up to depth ∞):\n" + " org.eclipse.jetty.orbit:javax.servlet/3.0.0.v201112011016\n" + " org.eclipse.jetty:jetty-http/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-io/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-security/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-server/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-servlet/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-util/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-webapp/9.0.2.v20130417\n" + " org.eclipse.jetty:jetty-xml/9.0.2.v20130417\n" + " org.slf4j:slf4j-api/1.7.7\n" + " org.slf4j:slf4j-simple/1.7.7\n"));
}
use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.
the class InfoToolTests method testOffline.
@Test
public void testOffline() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.<String>asList("--offline", "ceylon.language"));
}
use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.
the class InfoToolTests method testRecursiveDependencies.
@Test
public void testRecursiveDependencies() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "--show-incompatible=yes", "io.cayla.web/0.3.0"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().contains("Dependencies version conflicts (up to depth ∞):\n" + " org.jboss.logging: 3.1.2.GA, 3.1.3.GA\n"));
}
use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.
the class InfoToolTests method testNoArgs.
@Test
public void testNoArgs() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
try {
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Collections.<String>emptyList());
Assert.fail();
} catch (OptionArgumentException e) {
// asserting this is thrown
}
}
use of com.redhat.ceylon.tools.info.CeylonInfoTool in project ceylon-compiler by ceylon.
the class InfoToolTests method testSuggestOverride.
@Test
public void testSuggestOverride() throws Exception {
ToolModel<CeylonInfoTool> model = pluginLoader.loadToolModel("info");
Assert.assertNotNull(model);
CeylonInfoTool tool = pluginFactory.bindArguments(model, getMainTool(), Arrays.asList("--dependency-depth=-1", "--show-incompatible=yes", "--print-overrides", "io.cayla.web/0.3.0"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
Assert.assertTrue(b.toString().contains("<overrides>\n" + " <set module=\"org.jboss.logging\" version=\"3.1.3.GA\"/>\n" + "</overrides>\n"));
}
Aggregations