Skip to content

Commit

Permalink
Test class name escaping ceylon/ceylon-compiler#1987
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Jan 9, 2015
1 parent 3dc6855 commit c9c71f1
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,29 @@ public void testDefaultFunction() throws Exception {
assertOutput(tool, OUT_EXPECTED_DEFAULT);
}

@Test
public void testQuotedModuleName() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, options("foo.long.module/1.0.0"));
assertOutput(tool, "Hello, World!");
}

@Test
public void testQuotedModuleNameNoVersion() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, options("foo.long.module"));
assertOutput(tool, "Hello, World!");
}

@Test
public void testQuotedModuleNameVersion() throws Exception {
ToolModel<CeylonRunTool> model = pluginLoader.loadToolModel("run");
Assert.assertNotNull(model);
CeylonRunTool tool = pluginFactory.bindArguments(model, options("--run=foo.long.module::run", "foo.long.module/1.0.0"));
assertOutput(tool, "Hello, World!");
}
private void assertOutput(CeylonRunTool tool, String txt) throws IOException {
PrintStream oldout = System.out;
PrintStream out = null;
Expand Down

0 comments on commit c9c71f1

Please sign in to comment.