ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs ZipTest.java
Date Wed, 25 Aug 2004 14:56:41 GMT
antoine     2004/08/25 07:56:41

  Modified:    .        WHATSNEW
               src/etc/testcases/taskdefs zip.xml
               src/testcases/org/apache/tools/ant/taskdefs ZipTest.java
  Log:
  Zip task did not create tasks when there are only empty directories in the selection
  I have simply added a testcase, the code was already fixed by Matt Benson in Zip.java
  revision 1.128
  PR: 30365
  
  Revision  Changes    Path
  1.653     +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.652
  retrieving revision 1.653
  diff -u -r1.652 -r1.653
  --- WHATSNEW	23 Aug 2004 20:27:37 -0000	1.652
  +++ WHATSNEW	25 Aug 2004 14:56:41 -0000	1.653
  @@ -80,6 +80,8 @@
   
   * FTP task, getTimeDiff method was returning wrong value. Bugzilla 30595.
   
  +* Zip task was not zipping when only empty directories were found. Bugzilla 30365.
  +
   Changes from Ant 1.6.1 to Ant 1.6.2
   ===================================
   
  
  
  
  1.15      +7 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- zip.xml	7 Jun 2004 12:17:25 -0000	1.14
  +++ zip.xml	25 Aug 2004 14:56:41 -0000	1.15
  @@ -128,6 +128,12 @@
       <zip destfile="test3.zip" basedir="ziptest" whenempty="skip"/>
     </target>
   
  +  <!-- Bugzilla Report 30365 -->
  +  <target name="zipEmptyDir">
  +        <mkdir dir="empty/empty2"/>
  +		<zip destfile="test3.zip" basedir="empty" update="true"/>
  +  </target>
  +
     <target name="cleanup">
       <delete file="test3.zip"/>
       <delete file="test4.zip"/>
  @@ -140,5 +146,6 @@
       <delete file="zipgroupfileset.zip"/>
       <delete file="../dummyfile" />
       <delete dir="ziptest"/>
  +    <delete dir="empty"/>
     </target>
   </project>
  
  
  
  1.21      +6 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ZipTest.java	7 Jun 2004 12:17:25 -0000	1.20
  +++ ZipTest.java	25 Aug 2004 14:56:41 -0000	1.21
  @@ -133,4 +133,10 @@
           assertTrue("archive should get skipped",
                      !getProject().resolveFile("test3.zip").exists());
       }
  +    // Bugzilla Report 30365
  +    public void testZipEmptyDir() {
  +        executeTarget("zipEmptyDir");
  +        assertTrue("archive should be created",
  +                   getProject().resolveFile("test3.zip").exists());
  +    }
   }
  
  
  

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


Mime
View raw message