ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r775911 - /ant/core/trunk/src/tests/antunit/taskdefs/javadoc-test.xml
Date Mon, 18 May 2009 12:00:31 GMT
Author: bodewig
Date: Mon May 18 12:00:31 2009
New Revision: 775911

URL: http://svn.apache.org/viewvc?rev=775911&view=rev
Log:
testcase for PR 47196

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

Modified: ant/core/trunk/src/tests/antunit/taskdefs/javadoc-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/javadoc-test.xml?rev=775911&r1=775910&r2=775911&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/javadoc-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/javadoc-test.xml Mon May 18 12:00:31 2009
@@ -19,20 +19,31 @@
   <import file="../antunit-base.xml" />
 
   <target name="-makeTestClass">
-    <mkdir dir="${input}/test"/>
-    <echo file="${input}/test/A.java"><![CDATA[
-package test;
+    <macrodef name="mktest">
+      <attribute name="package"/>
+      <attribute name="class"/>
+      <sequential>
+    <mkdir dir="${input}/@{package}"/>
+    <echo file="${input}/@{package}/@{class}.java"><![CDATA[
+package @{package};
 
 /**
  * This is a test class.
  */
-public class A {
+public class @{class} {
     /**
      * With a test method.
      */
     public void foo(String bar) {}
 }
 ]]></echo>
+      </sequential>
+    </macrodef>
+    <mktest package="test" class="A"/>
+  </target>
+
+  <target name="-makeTwoTestClasses" depends="-makeTestClass">
+    <mktest package="test2" class="B"/>
   </target>
 
   <target name="testBottomWithLineBreaksWithFile" depends="-makeTestClass">
@@ -60,6 +71,26 @@
     <mkfoo file="${input}/test/doc-files/b/foo.html"/>
   </target>
 
+  <target name="testPackageSetNoExcludes" depends="-makeTwoTestClasses">
+    <javadoc destdir="${output}">
+      <packageset dir="${input}"/>
+    </javadoc>
+    <au:assertFileExists file="${output}/test/A.html"/>
+    <au:assertFileExists file="${output}/test2/B.html"/>
+  </target>
+
+  <target name="testPackageSetWithExcludes"
+          depends="-makeTwoTestClasses"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47196">
+    <javadoc destdir="${output}">
+      <packageset dir="${input}">
+        <exclude name="test2"/>
+      </packageset>
+    </javadoc>
+    <au:assertFileExists file="${output}/test/A.html"/>
+    <au:assertFileDoesntExist file="${output}/test2/B.html"/>
+  </target>
+
   <target name="XtestNoDocFiles" depends="-setUpDocFilesTests">
     <javadoc destdir="${output}">
       <packageset dir="${input}"/>



Mime
View raw message