ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs ZipTest.java
Date Fri, 02 May 2003 14:24:59 GMT
bodewig     2003/05/02 07:24:58

  Modified:    src/etc/testcases/taskdefs zip.xml
               src/testcases/org/apache/tools/ant/taskdefs ZipTest.java
  Log:
  Demonstrate bug 19449
  
  Revision  Changes    Path
  1.12      +15 -0     ant/src/etc/testcases/taskdefs/zip.xml
  
  Index: zip.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/zip.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- zip.xml	27 Mar 2003 09:43:48 -0000	1.11
  +++ zip.xml	2 May 2003 14:24:57 -0000	1.12
  @@ -102,6 +102,20 @@
       </zip>
     </target>
   
  +  <!-- Bugzilla Report 19449 -->
  +  <target name="testFilesOnlyDoesntCauseRecreateSetup">
  +    <mkdir dir="ziptest"/>
  +    <touch file="ziptest/ziptest"/>
  +    <zip destfile="test3.zip" basedir="."
  +         includes="ziptest/**" filesonly="true"/>
  +  </target>
  +
  +  <!-- Bugzilla Report 19449 -->
  +  <target name="testFilesOnlyDoesntCauseRecreate">
  +    <zip destfile="test3.zip" basedir="."
  +         includes="ziptest/**" filesonly="true"/>
  +  </target>
  +
     <target name="cleanup">
       <delete file="test3.zip"/>
       <delete file="test4.zip"/>
  @@ -113,5 +127,6 @@
       <delete file="asf-logo.gif.zip"/>
       <delete file="zipgroupfileset.zip"/>
       <delete file="../dummyfile" />
  +    <delete dir="ziptest"/>
     </target>
   </project>
  
  
  
  1.14      +10 -0     ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
  
  Index: ZipTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ZipTest.java	27 Mar 2003 09:43:49 -0000	1.13
  +++ ZipTest.java	2 May 2003 14:24:58 -0000	1.14
  @@ -144,4 +144,14 @@
           ZipEntry ze = zf.getEntry("test/");
           assertNotNull("test/ has been added", ze);
       }
  +
  +    // Bugzilla Report 19449
  +    public void testFilesOnlyDoesntCauseRecreate() 
  +        throws InterruptedException {
  +        executeTarget("testFilesOnlyDoesntCauseRecreateSetup");
  +        long l = getProject().resolveFile("test3.zip").lastModified();
  +        Thread.currentThread().sleep(3000);
  +        executeTarget("testFilesOnlyDoesntCauseRecreate");
  +        assertEquals(l, getProject().resolveFile("test3.zip").lastModified());
  +    }
   }
  
  
  

Mime
View raw message