ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r793562 - /ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml
Date Mon, 13 Jul 2009 11:51:59 GMT
Author: bodewig
Date: Mon Jul 13 11:51:58 2009
New Revision: 793562

URL: http://svn.apache.org/viewvc?rev=793562&view=rev
Log:
testcases for PR 43114

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml?rev=793562&r1=793561&r2=793562&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/javac-test.xml Mon Jul 13 11:51:58 2009
@@ -86,4 +86,37 @@
       <equals arg1="${compile-failed}" arg2="true"/>
     </au:assertTrue>
   </target>
+
+  <target name="testPackageInfoJava"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=43114">
+    <mkdir dir="${javac-dir}/src/a"/>
+    <mkdir dir="${build-dir}"/>
+    <echo file="${javac-dir}/src/a/package-info.java"><![CDATA[
+/**
+ * Some test javadocs at the package level.
+ */
+]]></echo>
+    <javac srcdir="${javac-dir}/src" destdir="${build-dir}"
+           updatedProperty="first-pass"/>
+    <au:assertPropertyEquals name="first-pass" value="true"/>
+
+    <!-- no changes, shouldn't recompile, the initial bug -->
+    <javac srcdir="${javac-dir}/src" destdir="${build-dir}"
+           updatedProperty="second-pass"/>
+    <au:assertFalse>
+      <isset property="second-pass"/>
+    </au:assertFalse>
+    <sleep seconds="2"/>
+
+    <!-- change package-info.java but make containing target dir even
+         more recent - the regression in Ant 1.7.1 -->
+    <touch file="${javac-dir}/src/a/package-info.java"/>
+    <sleep seconds="2"/>
+    <touch>
+      <file file="${build-dir}/a"/>
+    </touch>
+    <javac srcdir="${javac-dir}/src" destdir="${build-dir}"
+           updatedProperty="third-pass"/>
+    <au:assertPropertyEquals name="third-pass" value="true"/>
+  </target>
 </project>



Mime
View raw message