Author: bodewig
Date: Wed Feb 10 13:31:55 2010
New Revision: 908494

URL: http://svn.apache.org/viewvc?rev=908494&view=rev
Log:
add a test for <war> to guard against a bug like 6836 from <ear>

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

Modified: ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml?rev=908494&r1=908493&r2=908494&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/war-test.xml Wed Feb 10 13:31:55 
2010
@@ -184,4 +184,15 @@
     <unzip src="${output}/test.war" dest="${output}/out"/>
     <au:assertFileExists file="${output}/out/WEB-INF/lib/ant.jar"/>
   </target>
+
+  <target name="testOnlyOneWebXml">
+    <mkdir dir="${input}/WEB-INF"/>
+    <mkdir dir="${output}"/>
+    <touch file="${input}/WEB-INF/web.xml"/>
+    <touch file="${input}/x.xml"/>
+    <war destfile="${output}/test.war" webxml="${input}/x.xml">
+      <fileset dir="${input}"/>
+    </war>
+    <au:assertLogContains text="Warning: selected war files include a second 
WEB-INF/web.xml which will be ignored."/>
+  </target>
 </project>


Reply via email to