Author: bodewig
Date: Fri Aug 21 03:56:00 2009
New Revision: 806413
URL: http://svn.apache.org/viewvc?rev=806413&view=rev
Log:
tests for the remaining archiving tasks
Added:
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
- copied, changed from r806412,
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
- copied, changed from r806412,
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml
- copied, changed from r806412,
ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
Copied: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml (from
r806412, ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml)
URL:
http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml?p2=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml&p1=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml&r1=806412&r2=806413&rev=806413&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml Fri Aug 21
03:56:00 2009
@@ -24,42 +24,42 @@
<target name="setUp">
<mkdir dir="${output}"/>
- <property name="dest" location="${output}/test.cpio"/>
+ <property name="dest" location="${output}/test.ar"/>
<macrodef name="checkProperties">
<attribute name="dateTime"/>
<attribute name="uid" default="0"/>
<attribute name="gid" default="0"/>
- <attribute name="mode" default="32768"/>
+ <attribute name="mode" default="100644"/>
<sequential>
<au:assertTrue>
<cond:islastmodified datetime="@{dateTime}"
pattern="yyyy-MM-dd-HH:mm:ss Z">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:arentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:arentry>
</cond:islastmodified>
</au:assertTrue>
<au:assertTrue>
<cmp:hasuserid id="@{uid}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:arentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:arentry>
</cmp:hasuserid>
</au:assertTrue>
<au:assertTrue>
<cmp:hasgroupid id="@{gid}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:arentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:arentry>
</cmp:hasgroupid>
</au:assertTrue>
- <au:assertTrue>
+ <!--au:assertTrue>
<cmp:hasmode mode="@{mode}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:arentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:arentry>
</cmp:hasmode>
- </au:assertTrue>
+ </au:assertTrue-->
</sequential>
</macrodef>
</target>
@@ -70,60 +70,60 @@
<touch datetime="2009-08-19-05:49:21 +0200"
pattern="yyyy-MM-dd-HH:mm:ss Z"
file="${input}/asf-logo.gif"/>
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<fileset dir="${input}" includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2009-08-19-05:49:21 +0200"/>
</target>
<target name="testCoreZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testAntlibZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<cmp:zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testCoreTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
uid="500" gid="500"/>
</target>
<target name="testAntlibTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<cmp:tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
uid="500" gid="500"/>
</target>
<target name="testArFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<cmp:arfileset src="../resources/asf-logo.gif.ar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="100644"
uid="1000" gid="1000"/>
</target>
<target name="testCpioFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:ar destfile="${dest}">
<cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:ar>
<checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
uid="1000" gid="1000"/>
</target>
Copied: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml (from
r806412, ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml)
URL:
http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml?p2=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml&p1=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml&r1=806412&r2=806413&rev=806413&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml Fri Aug
21 03:56:00 2009
@@ -24,42 +24,58 @@
<target name="setUp">
<mkdir dir="${output}"/>
- <property name="dest" location="${output}/test.cpio"/>
+ <property name="dest" location="${output}/test.tar"/>
<macrodef name="checkProperties">
<attribute name="dateTime"/>
<attribute name="uid" default="0"/>
<attribute name="gid" default="0"/>
- <attribute name="mode" default="32768"/>
+ <attribute name="mode" default="33188"/>
+ <attribute name="user" default=""/>
+ <attribute name="group" default=""/>
<sequential>
<au:assertTrue>
<cond:islastmodified datetime="@{dateTime}"
pattern="yyyy-MM-dd-HH:mm:ss Z">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:tarentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:tarentry>
</cond:islastmodified>
</au:assertTrue>
<au:assertTrue>
<cmp:hasuserid id="@{uid}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:tarentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:tarentry>
</cmp:hasuserid>
</au:assertTrue>
<au:assertTrue>
<cmp:hasgroupid id="@{gid}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:tarentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:tarentry>
</cmp:hasgroupid>
</au:assertTrue>
<au:assertTrue>
<cmp:hasmode mode="@{mode}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:tarentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:tarentry>
</cmp:hasmode>
</au:assertTrue>
+ <au:assertTrue>
+ <cmp:hasusername name="@{user}">
+ <cmp:tarentry name="asf-logo.gif">
+ <file file="${dest}"/>
+ </cmp:tarentry>
+ </cmp:hasusername>
+ </au:assertTrue>
+ <au:assertTrue>
+ <cmp:hasgroupname name="@{group}">
+ <cmp:tarentry name="asf-logo.gif">
+ <file file="${dest}"/>
+ </cmp:tarentry>
+ </cmp:hasgroupname>
+ </au:assertTrue>
</sequential>
</macrodef>
</target>
@@ -70,60 +86,60 @@
<touch datetime="2009-08-19-05:49:21 +0200"
pattern="yyyy-MM-dd-HH:mm:ss Z"
file="${input}/asf-logo.gif"/>
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<fileset dir="${input}" includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2009-08-19-05:49:21 +0200"/>
</target>
<target name="testCoreZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testAntlibZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<cmp:zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testCoreTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
- uid="500" gid="500"/>
+ uid="500" gid="500" user="bodewig" group="bodewig"/>
</target>
- <target name="testAntlibTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <!--target name="testAntlibTarFileSet" depends="setUp">
+ <cmp:tar destfile="${dest}">
<cmp:tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
- uid="500" gid="500"/>
- </target>
+ uid="500" gid="500" user="bodewig" group="bodewig"/>
+ </target-->
<target name="testArFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<cmp:arfileset src="../resources/asf-logo.gif.ar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="100644"
uid="1000" gid="1000"/>
</target>
<target name="testCpioFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:tar destfile="${dest}">
<cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:tar>
<checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
uid="1000" gid="1000"/>
</target>
Copied: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml (from
r806412, ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml)
URL:
http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml?p2=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml&p1=ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml&r1=806412&r2=806413&rev=806413&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml Fri Aug
21 03:56:00 2009
@@ -24,40 +24,25 @@
<target name="setUp">
<mkdir dir="${output}"/>
- <property name="dest" location="${output}/test.cpio"/>
+ <property name="dest" location="${output}/test.zip"/>
<macrodef name="checkProperties">
<attribute name="dateTime"/>
- <attribute name="uid" default="0"/>
- <attribute name="gid" default="0"/>
- <attribute name="mode" default="32768"/>
+ <!-- FIXME -->
+ <attribute name="mode" default="0"/>
<sequential>
<au:assertTrue>
<cond:islastmodified datetime="@{dateTime}"
pattern="yyyy-MM-dd-HH:mm:ss Z">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:zipentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:zipentry>
</cond:islastmodified>
</au:assertTrue>
<au:assertTrue>
- <cmp:hasuserid id="@{uid}">
- <cmp:cpioentry name="asf-logo.gif">
- <file file="${dest}"/>
- </cmp:cpioentry>
- </cmp:hasuserid>
- </au:assertTrue>
- <au:assertTrue>
- <cmp:hasgroupid id="@{gid}">
- <cmp:cpioentry name="asf-logo.gif">
- <file file="${dest}"/>
- </cmp:cpioentry>
- </cmp:hasgroupid>
- </au:assertTrue>
- <au:assertTrue>
<cmp:hasmode mode="@{mode}">
- <cmp:cpioentry name="asf-logo.gif">
+ <cmp:zipentry name="asf-logo.gif">
<file file="${dest}"/>
- </cmp:cpioentry>
+ </cmp:zipentry>
</cmp:hasmode>
</au:assertTrue>
</sequential>
@@ -70,61 +55,61 @@
<touch datetime="2009-08-19-05:49:21 +0200"
pattern="yyyy-MM-dd-HH:mm:ss Z"
file="${input}/asf-logo.gif"/>
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<fileset dir="${input}" includes="asf-logo.gif"/>
- </cmp:cpio>
- <checkProperties dateTime="2009-08-19-05:49:21 +0200"/>
+ </cmp:zip>
+ <checkProperties dateTime="2009-08-19-05:49:20 +0200"/>
</target>
<target name="testCoreZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:zip>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testAntlibZipFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<cmp:zipfileset src="../resources/asf-logo.gif.zip"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:zip>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"/>
</target>
<target name="testCoreTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:zip>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
- uid="500" gid="500"/>
+ />
</target>
<target name="testAntlibTarFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<cmp:tarfileset src="../resources/asf-logo.gif.tar"
includes="asf-logo.gif"/>
- </cmp:cpio>
+ </cmp:zip>
<checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
- uid="500" gid="500"/>
+ />
</target>
<target name="testArFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<cmp:arfileset src="../resources/asf-logo.gif.ar"
includes="asf-logo.gif"/>
- </cmp:cpio>
- <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="100644"
- uid="1000" gid="1000"/>
+ </cmp:zip>
+ <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="35108"
+ />
</target>
<target name="testCpioFileSet" depends="setUp">
- <cmp:cpio destfile="${dest}">
+ <cmp:zip destfile="${dest}">
<cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
includes="asf-logo.gif"/>
- </cmp:cpio>
- <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
- uid="1000" gid="1000"/>
+ </cmp:zip>
+ <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="33188"
+ />
</target>
</project>