summaryrefslogtreecommitdiffstats
path: root/ajde/testsrc
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-04 07:14:47 +0000
committeraclement <aclement>2006-05-04 07:14:47 +0000
commit5a01932b9dbdf81fe41e029fa56ede17364a2c2e (patch)
treea2991f73f2b496670e3de21f00538fbae9da891d /ajde/testsrc
parentcb5dfe759852d4965c692934ed7e14c41f61b715 (diff)
downloadaspectj-5a01932b9dbdf81fe41e029fa56ede17364a2c2e.tar.gz
aspectj-5a01932b9dbdf81fe41e029fa56ede17364a2c2e.zip
fixes for 137235 (contributed by Ron): more intelligent logic for determining if a path entry is a jar/zip (don't just rely on suffix, some new .bndl files seem to be becoming popular...)
Diffstat (limited to 'ajde/testsrc')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/NullIdeProperties.java7
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ResourceCopyTestCase.java23
-rw-r--r--ajde/testsrc/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java2
3 files changed, 30 insertions, 2 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeProperties.java b/ajde/testsrc/org/aspectj/ajde/NullIdeProperties.java
index 406e7e5bf..233933a7a 100644
--- a/ajde/testsrc/org/aspectj/ajde/NullIdeProperties.java
+++ b/ajde/testsrc/org/aspectj/ajde/NullIdeProperties.java
@@ -33,6 +33,7 @@ public class NullIdeProperties implements ProjectPropertiesAdapter {
private Set sourceRoots;
private Set aspectPath;
private String outJar;
+ private String outputPath = "bin";
public NullIdeProperties(String testProjectPath) {
this.testProjectPath = testProjectPath;
@@ -75,7 +76,11 @@ public class NullIdeProperties implements ProjectPropertiesAdapter {
}
public String getOutputPath() {
- return testProjectPath + "/bin";
+ return testProjectPath + "/" + outputPath;
+ }
+
+ public void setOutputPath(String outputPath) {
+ this.outputPath = outputPath;
}
public String getAjcWorkingDir() {
diff --git a/ajde/testsrc/org/aspectj/ajde/ResourceCopyTestCase.java b/ajde/testsrc/org/aspectj/ajde/ResourceCopyTestCase.java
index cb7ca236d..657963510 100644
--- a/ajde/testsrc/org/aspectj/ajde/ResourceCopyTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ResourceCopyTestCase.java
@@ -98,6 +98,29 @@ public class ResourceCopyTestCase extends AjdeTestCase {
assertTrue("Build warnings",ideManager.getCompilationSourceLineTasks().isEmpty());
compareInjarsToBin(injar1,"src","bin");
}
+
+ public void testInjarsToOddBin () {
+ Set injars = new HashSet();
+ File injar1 = openFile(injar1Name);
+ injars.add(injar1);
+ ideManager.getProjectProperties().setOutputPath("crazy.jar");
+ ideManager.getProjectProperties().setInJars(injars);
+ assertTrue("Build failed",doSynchronousBuild("config2.lst"));
+ assertTrue("Build warnings",ideManager.getCompilationSourceLineTasks().isEmpty());
+ compareInjarsToBin(injar1,"src","crazy.jar");
+ }
+
+ public void testInjarsToOutjarOddNames () {
+ Set injars = new HashSet();
+ File injar1 = openFile("input1");
+ File outjar = openFile(outjarName+".fozout");
+ injars.add(injar1);
+ ideManager.getProjectProperties().setInJars(injars);
+ ideManager.getProjectProperties().setOutJar(outjar.getAbsolutePath());
+ assertTrue("Build failed",doSynchronousBuild("config2.lst"));
+ assertTrue("Build warnings",ideManager.getCompilationSourceLineTasks().isEmpty());
+ compareJars(injar1,"src",outjar);
+ }
/*
* Ensure bin contains all non-Java resouces from source and injars
diff --git a/ajde/testsrc/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java b/ajde/testsrc/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java
index aca06e87e..19d04b8ca 100644
--- a/ajde/testsrc/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/internal/LstBuildConfigManagerTest.java
@@ -54,7 +54,7 @@ public class LstBuildConfigManagerTest extends AjdeTestCase {
doSynchronousBuild("bad-injar.lst");
messages = NullIdeManager.getIdeManager().getCompilationSourceLineTasks();
message = (NullIdeTaskListManager.SourceLineTask)messages.get(0);
- assertTrue(message.getContainedMessage().getMessage().indexOf("bad inpath") != -1);
+ assertTrue(message.getContainedMessage().getMessage().indexOf("skipping missing, empty or corrupt inpath entry") != -1);
}
public void testErrorMessages() throws IOException {