destDir.mkdirs();
FileUtil.copyAll(new File("test/src/com/redhat/ceylon/tools/test/cwdtest"), destDir);
ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
Assert.assertNotNull(model);
CeylonCompileTool tool = pluginFactory.bindArguments(model,
Arrays.asList(
"--cwd", destDir.getPath(),
"--src=src",
"--resource=res",
"--out=mod",
"--rep", "aether",
"--maven-overrides", "overrides.xml",
"--javac=-cp=" + getClassPathAsPath(), // Unfortunately --cwd doesn't affect Java options
"cwdtest"));
tool.run();
File carFile = getModuleArchive("cwdtest", "1", (new File(destDir, "mod")).getPath());
assertTrue(carFile.exists());
JarFile car = new JarFile(carFile);