ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r477920 - /ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml
Date Tue, 21 Nov 2006 22:00:04 GMT
Author: peterreilly
Date: Tue Nov 21 14:00:03 2006
New Revision: 477920

URL: http://svn.apache.org/viewvc?view=rev&rev=477920
Log:
unittest for adding prefix to a fileset ref

Modified:
    ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml

Modified: ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml?view=diff&rev=477920&r1=477919&r2=477920
==============================================================================
--- ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/types/zipfileset-test.xml Tue Nov 21 14:00:03 2006
@@ -1,4 +1,27 @@
 <project xmlns:au="antlib:org.apache.ant.antunit" default="all">
+  <property name="top.build.dir" location="../../../../build"/>
+  <property name="build.dir"
+            location="${top.build.dir}/ant-unit/zipfileset-dir"/>
+
+  <target name="test-refid-modify">
+    <fileset id="modify-refid-1"
+             dir="${basedir}"
+             includes="*.xml"
+             />
+    <zipfileset id="modify-refid-2"
+                refid="modify-refid-1"
+                prefix="WEB-INF/lib/"/>
+    <delete quiet="yes" dir="${build.dir}"/>
+    <mkdir dir="${build.dir}"/>
+    <jar jarfile="${build.dir}/jar.jar">
+      <zipfileset refid="modify-refid-2"/>
+    </jar>
+    <unjar src="${build.dir}/jar.jar"
+           dest="${build.dir}"/>
+    <au:assertTrue>
+      <available file="${build.dir}/WEB-INF/lib/zipfileset-test.xml"/>
+    </au:assertTrue>
+  </target>
 
   <target name="test-refid-check-prefix">
     <zipfileset id="test-refid"



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message