]> source.dussan.org Git - aspectj.git/commitdiff
186673: test and fix. Don't rely on suffix for identifying jars and zips
authoraclement <aclement>
Thu, 1 Nov 2007 13:25:16 +0000 (13:25 +0000)
committeraclement <aclement>
Thu, 1 Nov 2007 13:25:16 +0000 (13:25 +0000)
tests/bugs154/pr186673/A.java [new file with mode: 0644]
tests/bugs154/pr186673/Apple.java [new file with mode: 0644]
tests/bugs154/pr186673/Main.java [new file with mode: 0644]
tests/bugs154/pr186673/Orange.java [new file with mode: 0644]
tests/bugs154/pr186673/ant.xml [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
tests/src/org/aspectj/systemtest/ajc154/ajc154.xml

diff --git a/tests/bugs154/pr186673/A.java b/tests/bugs154/pr186673/A.java
new file mode 100644 (file)
index 0000000..c064fb7
--- /dev/null
@@ -0,0 +1,19 @@
+import org.aspectj.lang.annotation.*;
+import org.aspectj.lang.*;
+
+@interface I {}
+
+@I
+public class A {
+  public void m() {}
+}
+
+@Aspect
+class X {
+  @Around("execution(* (@I *).*(..))") 
+  public Object foo(ProceedingJoinPoint pjp) {
+return null;
+  }
+}
+
+
diff --git a/tests/bugs154/pr186673/Apple.java b/tests/bugs154/pr186673/Apple.java
new file mode 100644 (file)
index 0000000..c08a4f3
--- /dev/null
@@ -0,0 +1,3 @@
+public class Apple {
+  public void m() {}
+}
diff --git a/tests/bugs154/pr186673/Main.java b/tests/bugs154/pr186673/Main.java
new file mode 100644 (file)
index 0000000..3790571
--- /dev/null
@@ -0,0 +1,6 @@
+public class Main {
+  public static void main(String []argv) {
+    new Apple().m();
+    new Orange().m();
+  }
+}
diff --git a/tests/bugs154/pr186673/Orange.java b/tests/bugs154/pr186673/Orange.java
new file mode 100644 (file)
index 0000000..9aed34d
--- /dev/null
@@ -0,0 +1,3 @@
+public class Orange {
+  public void m() {}
+}
diff --git a/tests/bugs154/pr186673/ant.xml b/tests/bugs154/pr186673/ant.xml
new file mode 100644 (file)
index 0000000..8cfc307
--- /dev/null
@@ -0,0 +1,18 @@
+<project name="ltw with funny libraries" default="default" basedir=".">\r
+    <target name="default" >\r
+      <echo> This script builds the AspectJ examples.  </echo>\r
+      <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">\r
+          <classpath> \r
+            <pathelement path="${aj.root}/lib/aspectj/aspectjtools.jar"/>\r
+          </classpath>\r
+      </taskdef>\r
+       <iajc destdir="${classes.dir}" argfiles="${list}" \r
+                       fork="true"\r
+                       forkclasspath="${aspectjtools.jar}"\r
+          classpath="${aspectjrt.jar}"/>\r
+\r
+       <antcall target="Ajx-run" >\r
+         <param name="class" value="${class}"/>\r
+       </antcall>\r
+    </target>\r
+</project>\r
index eb77bd94980c7b6df7d580c189595cacc033d2a5..5c87ea69f63937fea45294e18c42790c9288d1d5 100644 (file)
@@ -45,6 +45,7 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 //             runTest("new pointcut designators in a reference pointcut");
 //     }
        
+       public void testJarsZipsNonStandardSuffix_pr186673() { runTest("jars and zips with non-standard suffix");}
        //public void testGenericTypeParameterizedWithArrayType_pr167197() { runTest("generic type parameterized with array type");}
        
        
index ca7c65407bb609ad871715b80eaf9ab89bb2972a..861e68b78575297b07724973175b971f67201c81 100644 (file)
      <compile options="-1.5" files="AspectBreaker.java"/>
    </ajc-test>
    
+   <ajc-test dir="bugs154/pr186673" title="jars and zips with non-standard suffix">
+     <compile options="-1.5" files="Apple.java" outjar="apple.jar.0"/>
+     <compile options="-1.5" files="Orange.java" outjar="orange.zipfoo"/>
+     <!-- check ant and a standard compile -->
+     <!--ant file="ant.xml" target="default" verbose="true">
+        <stdout>
+             <line text="Blah"/>
+               </stdout>
+     </ant-->
+     <compile options="-1.5" files="Main.java" classpath="orange.zipfoo,apple.jar.0"/>
+   </ajc-test>
    
    <ajc-test dir="bugs154/pr203646" title="npe with itd on inner generic interface">
      <compile options="-1.5" files="Bang.java"/>