You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2009/09/21 06:29:10 UTC

svn commit: r817155 - in /ant/sandbox/antlibs/compress/trunk/src/tests/antunit: ar-test.xml cpio-test.xml tar-test.xml zip-test.xml

Author: bodewig
Date: Mon Sep 21 04:29:09 2009
New Revision: 817155

URL: http://svn.apache.org/viewvc?rev=817155&view=rev
Log:
prepare for update mode

Modified:
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml

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=817155&r1=817154&r2=817155&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 Mon Sep 21 04:29:09 2009
@@ -389,10 +389,10 @@
                          actual="${output}/ar-test.xml"/>
   </target>
 
-  <target name="-prepareArchive" depends="setUp">
+  <target name="-prepareArchiveForModeTests" depends="setUp">
     <mkdir dir="${input}"/>
     <copy todir="${input}">
-      <fileset dir="." includes="*r-test.xml"/>
+      <fileset dir="." includes="*r-test.xml,zip-test.xml"/>
     </copy>
     <cmp:ar dest="${dest}">
       <fileset dir="${input}"/>
@@ -401,14 +401,17 @@
       <file file="${dest}"/>
       <globmapper from="*" to="*.bak"/>
     </copy>
+    <property name="timestamp" value="2000-01-01-00:00:00 +0000"/>
+    <touch datetime="${timestamp}" file="${input}/zip-test.xml"
+           pattern="yyyy-MM-dd-HH:mm:ss Z"/>
     <sleep seconds="2"/>
     <touch file="${dest}.bak"/>
     <sleep seconds="2"/>
   </target>
 
-  <target name="testCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testCreateOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:ar dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogContains
        text="test.ar is up-to-date, nothing to do."/>
@@ -416,9 +419,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testForceCreateOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:ar dest="${dest}" mode="force-create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogDoesntContain
        text="test.ar is up-to-date, nothing to do."/>
@@ -431,10 +435,10 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testCreateOfOutOfDate" depends="-prepareArchive">
+  <target name="testCreateOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:ar dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogDoesntContain
        text="test.ar is up-to-date, nothing to do."/>
@@ -447,9 +451,9 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testReplaceOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:ar dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogContains
        text="test.ar is up-to-date, nothing to do."/>
@@ -457,9 +461,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testForceReplaceOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:ar dest="${dest}" mode="force-replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogDoesntContain
        text="test.ar is up-to-date, nothing to do."/>
@@ -470,12 +475,20 @@
         <file file="${dest}"/>
       </cmp:arentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:arentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:arentry>
+      </cond:islastmodified>
+    </au:assertTrue>
   </target>
 
-  <target name="testReplaceOfOutOfDate" depends="-prepareArchive">
+  <target name="testReplaceOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:ar dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:ar>
     <au:assertLogDoesntContain
        text="test.ar is up-to-date, nothing to do."/>
@@ -486,5 +499,47 @@
         <file file="${dest}"/>
       </cmp:arentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:arentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:arentry>
+      </cond:islastmodified>
+    </au:assertTrue>
+  </target>
+
+  <target name="testUpdateOfUpToDate" depends="-prepareArchiveForModeTests">
+    <cmp:ar dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:ar>
+    <au:assertLogContains
+       text="test.ar is up-to-date, nothing to do."/>
+    <au:assertDestIsUptodate
+       src="${dest}" dest="${dest}.bak"/>
+  </target>
+
+  <target name="FUTURE-testUpdateOfOutOfDate" depends="-prepareArchiveForModeTests">
+    <touch file="${input}/ar-test.xml"/>
+    <cmp:ar dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:ar>
+    <au:assertLogDoesntContain
+       text="test.ar is up-to-date, nothing to do."/>
+    <au:assertDestIsOutofdate
+       src="${dest}" dest="${dest}.bak"/>
+    <assertResourceExists>
+      <cmp:arentry name="tar-test.xml">
+        <file file="${dest}"/>
+      </cmp:arentry>
+    </assertResourceExists>
+    <au:assertFalse>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:arentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:arentry>
+      </cond:islastmodified>
+    </au:assertFalse>
   </target>
 </project>

Modified: 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/cpio-test.xml?rev=817155&r1=817154&r2=817155&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml Mon Sep 21 04:29:09 2009
@@ -422,10 +422,10 @@
                          actual="${output}/ar-test.xml"/>
   </target>
 
-  <target name="-prepareArchive" depends="setUp">
+  <target name="-prepareArchiveForModeTests" depends="setUp">
     <mkdir dir="${input}"/>
     <copy todir="${input}">
-      <fileset dir="." includes="*r-test.xml"/>
+      <fileset dir="." includes="*r-test.xml,zip-test.xml"/>
     </copy>
     <cmp:cpio dest="${dest}">
       <fileset dir="${input}"/>
@@ -434,14 +434,17 @@
       <file file="${dest}"/>
       <globmapper from="*" to="*.bak"/>
     </copy>
+    <property name="timestamp" value="2000-01-01-00:00:00 +0000"/>
+    <touch datetime="${timestamp}" file="${input}/zip-test.xml"
+           pattern="yyyy-MM-dd-HH:mm:ss Z"/>
     <sleep seconds="2"/>
     <touch file="${dest}.bak"/>
     <sleep seconds="2"/>
   </target>
 
-  <target name="testCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testCreateOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:cpio dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogContains
        text="test.cpio is up-to-date, nothing to do."/>
@@ -449,9 +452,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testForceCreateOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:cpio dest="${dest}" mode="force-create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogDoesntContain
        text="test.cpio is up-to-date, nothing to do."/>
@@ -464,10 +468,10 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testCreateOfOutOfDate" depends="-prepareArchive">
+  <target name="testCreateOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:cpio dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogDoesntContain
        text="test.cpio is up-to-date, nothing to do."/>
@@ -480,9 +484,9 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testReplaceOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:cpio dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogContains
        text="test.cpio is up-to-date, nothing to do."/>
@@ -490,9 +494,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testForceReplaceOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:cpio dest="${dest}" mode="force-replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogDoesntContain
        text="test.cpio is up-to-date, nothing to do."/>
@@ -503,12 +508,20 @@
         <file file="${dest}"/>
       </cmp:cpioentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:cpioentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:cpioentry>
+      </cond:islastmodified>
+    </au:assertTrue>
   </target>
 
-  <target name="testReplaceOfOutOfDate" depends="-prepareArchive">
+  <target name="testReplaceOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:cpio dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:cpio>
     <au:assertLogDoesntContain
        text="test.cpio is up-to-date, nothing to do."/>
@@ -519,5 +532,48 @@
         <file file="${dest}"/>
       </cmp:cpioentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:cpioentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:cpioentry>
+      </cond:islastmodified>
+    </au:assertTrue>
   </target>
+
+  <target name="testUpdateOfUpToDate" depends="-prepareArchiveForModeTests">
+    <cmp:cpio dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:cpio>
+    <au:assertLogContains
+       text="test.cpio is up-to-date, nothing to do."/>
+    <au:assertDestIsUptodate
+       src="${dest}" dest="${dest}.bak"/>
+  </target>
+
+  <target name="FUTURE-testUpdateOfOutOfDate" depends="-prepareArchiveForModeTests">
+    <touch file="${input}/ar-test.xml"/>
+    <cmp:cpio dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:cpio>
+    <au:assertLogDoesntContain
+       text="test.cpio is up-to-date, nothing to do."/>
+    <au:assertDestIsOutofdate
+       src="${dest}" dest="${dest}.bak"/>
+    <assertResourceExists>
+      <cmp:cpioentry name="tar-test.xml">
+        <file file="${dest}"/>
+      </cmp:cpioentry>
+    </assertResourceExists>
+    <au:assertFalse>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:cpioentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:cpioentry>
+      </cond:islastmodified>
+    </au:assertFalse>
+  </target>
+
 </project>

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=817155&r1=817154&r2=817155&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 Mon Sep 21 04:29:09 2009
@@ -439,10 +439,10 @@
                          actual="${output}/ar-test.xml"/>
   </target>
 
-  <target name="-prepareArchive" depends="setUp">
+  <target name="-prepareArchiveForModeTests" depends="setUp">
     <mkdir dir="${input}"/>
     <copy todir="${input}">
-      <fileset dir="." includes="*r-test.xml"/>
+      <fileset dir="." includes="*r-test.xml,zip-test.xml"/>
     </copy>
     <cmp:tar dest="${dest}">
       <fileset dir="${input}"/>
@@ -451,14 +451,17 @@
       <file file="${dest}"/>
       <globmapper from="*" to="*.bak"/>
     </copy>
+    <property name="timestamp" value="2000-01-01-00:00:00 +0000"/>
+    <touch datetime="${timestamp}" file="${input}/zip-test.xml"
+           pattern="yyyy-MM-dd-HH:mm:ss Z"/>
     <sleep seconds="2"/>
     <touch file="${dest}.bak"/>
     <sleep seconds="2"/>
   </target>
 
-  <target name="testCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testCreateOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:tar dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogContains
        text="test.tar is up-to-date, nothing to do."/>
@@ -466,9 +469,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testForceCreateOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:tar dest="${dest}" mode="force-create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogDoesntContain
        text="test.tar is up-to-date, nothing to do."/>
@@ -481,10 +485,10 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testCreateOfOutOfDate" depends="-prepareArchive">
+  <target name="testCreateOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:tar dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogDoesntContain
        text="test.tar is up-to-date, nothing to do."/>
@@ -497,9 +501,9 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testReplaceOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:tar dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogContains
        text="test.tar is up-to-date, nothing to do."/>
@@ -507,9 +511,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testForceReplaceOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:tar dest="${dest}" mode="force-replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogDoesntContain
        text="test.tar is up-to-date, nothing to do."/>
@@ -520,12 +525,20 @@
         <file file="${dest}"/>
       </cmp:tarentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:tarentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:tarentry>
+      </cond:islastmodified>
+    </au:assertTrue>
   </target>
 
-  <target name="testReplaceOfOutOfDate" depends="-prepareArchive">
+  <target name="testReplaceOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:tar dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:tar>
     <au:assertLogDoesntContain
        text="test.tar is up-to-date, nothing to do."/>
@@ -536,5 +549,47 @@
         <file file="${dest}"/>
       </cmp:tarentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:tarentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:tarentry>
+      </cond:islastmodified>
+    </au:assertTrue>
+  </target>
+
+  <target name="testUpdateOfUpToDate" depends="-prepareArchiveForModeTests">
+    <cmp:tar dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:tar>
+    <au:assertLogContains
+       text="test.tar is up-to-date, nothing to do."/>
+    <au:assertDestIsUptodate
+       src="${dest}" dest="${dest}.bak"/>
+  </target>
+
+  <target name="FUTURE-testUpdateOfOutOfDate" depends="-prepareArchiveForModeTests">
+    <touch file="${input}/ar-test.xml"/>
+    <cmp:tar dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:tar>
+    <au:assertLogDoesntContain
+       text="test.tar is up-to-date, nothing to do."/>
+    <au:assertDestIsOutofdate
+       src="${dest}" dest="${dest}.bak"/>
+    <assertResourceExists>
+      <cmp:tarentry name="tar-test.xml">
+        <file file="${dest}"/>
+      </cmp:tarentry>
+    </assertResourceExists>
+    <au:assertFalse>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:tarentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:tarentry>
+      </cond:islastmodified>
+    </au:assertFalse>
   </target>
 </project>

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=817155&r1=817154&r2=817155&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 Mon Sep 21 04:29:09 2009
@@ -447,10 +447,10 @@
                          actual="${output}/ar-test.xml"/>
   </target>
 
-  <target name="-prepareArchive" depends="setUp">
+  <target name="-prepareArchiveForModeTests" depends="setUp">
     <mkdir dir="${input}"/>
     <copy todir="${input}">
-      <fileset dir="." includes="*r-test.xml"/>
+      <fileset dir="." includes="*r-test.xml,zip-test.xml"/>
     </copy>
     <cmp:zip dest="${dest}">
       <fileset dir="${input}"/>
@@ -459,14 +459,17 @@
       <file file="${dest}"/>
       <globmapper from="*" to="*.bak"/>
     </copy>
+    <property name="timestamp" value="2000-01-01-00:00:00 +0000"/>
+    <touch datetime="${timestamp}" file="${input}/zip-test.xml"
+           pattern="yyyy-MM-dd-HH:mm:ss Z"/>
     <sleep seconds="2"/>
     <touch file="${dest}.bak"/>
     <sleep seconds="2"/>
   </target>
 
-  <target name="testCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testCreateOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:zip dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogContains
        text="test.zip is up-to-date, nothing to do."/>
@@ -474,9 +477,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceCreateOfUpToDate" depends="-prepareArchive">
+  <target name="testForceCreateOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:zip dest="${dest}" mode="force-create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogDoesntContain
        text="test.zip is up-to-date, nothing to do."/>
@@ -489,10 +493,10 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testCreateOfOutOfDate" depends="-prepareArchive">
+  <target name="testCreateOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:zip dest="${dest}" mode="create">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogDoesntContain
        text="test.zip is up-to-date, nothing to do."/>
@@ -505,9 +509,9 @@
     </assertResourceDoesntExist>
   </target>
 
-  <target name="testReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testReplaceOfUpToDate" depends="-prepareArchiveForModeTests">
     <cmp:zip dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogContains
        text="test.zip is up-to-date, nothing to do."/>
@@ -515,9 +519,10 @@
        src="${dest}" dest="${dest}.bak"/>
   </target>
 
-  <target name="testForceReplaceOfUpToDate" depends="-prepareArchive">
+  <target name="testForceReplaceOfUpToDate"
+          depends="-prepareArchiveForModeTests">
     <cmp:zip dest="${dest}" mode="force-replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogDoesntContain
        text="test.zip is up-to-date, nothing to do."/>
@@ -528,12 +533,20 @@
         <file file="${dest}"/>
       </cmp:zipentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:zipentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:zipentry>
+      </cond:islastmodified>
+    </au:assertTrue>
   </target>
 
-  <target name="testReplaceOfOutOfDate" depends="-prepareArchive">
+  <target name="testReplaceOfOutOfDate" depends="-prepareArchiveForModeTests">
     <touch file="${input}/ar-test.xml"/>
     <cmp:zip dest="${dest}" mode="replace">
-      <fileset dir="${input}" includes="ar-test.xml"/>
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
     </cmp:zip>
     <au:assertLogDoesntContain
        text="test.zip is up-to-date, nothing to do."/>
@@ -544,5 +557,47 @@
         <file file="${dest}"/>
       </cmp:zipentry>
     </assertResourceExists>
+    <au:assertTrue>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:zipentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:zipentry>
+      </cond:islastmodified>
+    </au:assertTrue>
+  </target>
+
+  <target name="testUpdateOfUpToDate" depends="-prepareArchiveForModeTests">
+    <cmp:zip dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:zip>
+    <au:assertLogContains
+       text="test.zip is up-to-date, nothing to do."/>
+    <au:assertDestIsUptodate
+       src="${dest}" dest="${dest}.bak"/>
+  </target>
+
+  <target name="FUTURE-testUpdateOfOutOfDate" depends="-prepareArchiveForModeTests">
+    <touch file="${input}/ar-test.xml"/>
+    <cmp:zip dest="${dest}" mode="update">
+      <fileset dir="${input}" includes="ar-test.xml,zip-test.xml"/>
+    </cmp:zip>
+    <au:assertLogDoesntContain
+       text="test.zip is up-to-date, nothing to do."/>
+    <au:assertDestIsOutofdate
+       src="${dest}" dest="${dest}.bak"/>
+    <assertResourceExists>
+      <cmp:zipentry name="tar-test.xml">
+        <file file="${dest}"/>
+      </cmp:zipentry>
+    </assertResourceExists>
+    <au:assertFalse>
+      <cond:islastmodified datetime="${timestamp}"
+                           pattern="yyyy-MM-dd-HH:mm:ss Z">
+        <cmp:zipentry name="zip-test.xml">
+          <file file="${dest}"/>
+        </cmp:zipentry>
+      </cond:islastmodified>
+    </au:assertFalse>
   </target>
 </project>