ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r806795 - in /ant/sandbox/antlibs/compress/trunk/src/tests/antunit: ar-test.xml tar-test.xml zip-test.xml
Date Sat, 22 Aug 2009 06:21:31 GMT
Author: bodewig
Date: Sat Aug 22 06:21:31 2009
New Revision: 806795

URL: http://svn.apache.org/viewvc?rev=806795&view=rev
Log:
directory tests for the other three formats

Modified:
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml   (contents, props changed)
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml   (contents, props changed)
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml   (contents, props changed)

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml?rev=806795&r1=806794&r2=806795&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml Sat Aug 22 06:21:31 2009
@@ -25,6 +25,8 @@
   <target name="setUp">
     <mkdir dir="${output}"/>
     <property name="dest" location="${output}/test.ar"/>
+    <mkdir dir="${input}/s"/>
+    <copy todir="${input}/s" file="../resources/asf-logo.gif"/>
     <macrodef name="checkProperties">
       <attribute name="pattern" default="yyyy-MM-dd-HH:mm:ss Z"/>
       <attribute name="dateTime"/>
@@ -132,4 +134,37 @@
     <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
                      uid="1000" gid="1000"/>
   </target>
+
+  <target name="testNoDirectoriesByDefault" depends="setUp">
+    <cmp:ar destfile="${dest}">
+      <fileset dir="${input}"/>
+      <dirset dir="${input}"/>
+    </cmp:ar>
+    <assertResourceExists>
+      <cmp:arentry name="s/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:arentry>
+    </assertResourceExists>
+    <assertResourceDoesntExist>
+      <cmp:arentry name="s/">
+        <file file="${dest}"/>
+      </cmp:arentry>
+    </assertResourceDoesntExist>
+  </target>
+
+  <target name="testWithDirectories" depends="setUp">
+    <au:expectfailure>
+      <cmp:ar destfile="${dest}" filesonly="false">
+        <dirset dir="${input}" excludes="."/>
+      </cmp:ar>
+    </au:expectfailure>
+  </target>
+
+  <target name="testWithImplicitDirectories" depends="setUp">
+    <au:expectfailure>
+      <cmp:ar destfile="${dest}" filesonly="false">
+        <fileset dir="${input}"/>
+      </cmp:ar>
+    </au:expectfailure>
+  </target>
 </project>

Propchange: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 22 06:21:31 2009
@@ -0,0 +1 @@
+/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml:806793

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml?rev=806795&r1=806794&r2=806795&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml Sat Aug 22 06:21:31
2009
@@ -25,6 +25,8 @@
   <target name="setUp">
     <mkdir dir="${output}"/>
     <property name="dest" location="${output}/test.tar"/>
+    <mkdir dir="${input}/subdir"/>
+    <copy todir="${input}/subdir" file="../resources/asf-logo.gif"/>
     <macrodef name="checkProperties">
       <attribute name="dateTime"/>
       <attribute name="uid" default="0"/>
@@ -143,4 +145,53 @@
     <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
                      uid="1000" gid="1000"/>
   </target>
+
+  <target name="testNoDirectoriesByDefault" depends="setUp">
+    <cmp:tar destfile="${dest}">
+      <fileset dir="${input}"/>
+      <dirset dir="${input}"/>
+    </cmp:tar>
+    <assertResourceExists>
+      <cmp:tarentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceExists>
+    <assertResourceDoesntExist>
+      <cmp:tarentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceDoesntExist>
+  </target>
+
+  <target name="testWithDirectories" depends="setUp">
+    <cmp:tar destfile="${dest}" filesonly="false">
+      <dirset dir="${input}" excludes="."/>
+    </cmp:tar>
+    <assertResourceExists>
+      <cmp:tarentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceExists>
+    <assertResourceDoesntExist>
+      <cmp:tarentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceDoesntExist>
+  </target>
+
+  <target name="testWithImplicitDirectories" depends="setUp">
+    <cmp:tar destfile="${dest}" filesonly="false">
+      <fileset dir="${input}"/>
+    </cmp:tar>
+    <assertResourceExists>
+      <cmp:tarentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceExists>
+    <assertResourceExists>
+      <cmp:tarentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceExists>
+  </target>
 </project>

Propchange: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 22 06:21:31 2009
@@ -0,0 +1 @@
+/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml:806793

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml?rev=806795&r1=806794&r2=806795&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml Sat Aug 22 06:21:31
2009
@@ -25,6 +25,8 @@
   <target name="setUp">
     <mkdir dir="${output}"/>
     <property name="dest" location="${output}/test.zip"/>
+    <mkdir dir="${input}/subdir"/>
+    <copy todir="${input}/subdir" file="../resources/asf-logo.gif"/>
     <macrodef name="checkProperties">
       <attribute name="dateTime"/>
       <attribute name="mode" default="33188"/>
@@ -111,4 +113,53 @@
     <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="33188"
                      />
   </target>
+
+  <target name="testNoDirectoriesByDefault" depends="setUp">
+    <cmp:zip destfile="${dest}">
+      <fileset dir="${input}"/>
+      <dirset dir="${input}"/>
+    </cmp:zip>
+    <assertResourceExists>
+      <cmp:zipentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceExists>
+    <assertResourceDoesntExist>
+      <cmp:zipentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceDoesntExist>
+  </target>
+
+  <target name="testWithDirectories" depends="setUp">
+    <cmp:zip destfile="${dest}" filesonly="false">
+      <dirset dir="${input}" excludes="."/>
+    </cmp:zip>
+    <assertResourceExists>
+      <cmp:zipentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceExists>
+    <assertResourceDoesntExist>
+      <cmp:zipentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceDoesntExist>
+  </target>
+
+  <target name="testWithImplicitDirectories" depends="setUp">
+    <cmp:zip destfile="${dest}" filesonly="false">
+      <fileset dir="${input}"/>
+    </cmp:zip>
+    <assertResourceExists>
+      <cmp:zipentry name="subdir/">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceExists>
+    <assertResourceExists>
+      <cmp:zipentry name="subdir/asf-logo.gif">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceExists>
+  </target>
 </project>

Propchange: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 22 06:21:31 2009
@@ -0,0 +1 @@
+/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml:806793



Mime
View raw message