ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r677871 - in /ant/core/trunk/src: etc/testcases/taskdefs/zip.xml tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java
Date Fri, 18 Jul 2008 10:20:39 GMT
Author: bodewig
Date: Fri Jul 18 03:20:36 2008
New Revision: 677871

URL: http://svn.apache.org/viewvc?rev=677871&view=rev
Log:
add testcase for PR 34764

Modified:
    ant/core/trunk/src/etc/testcases/taskdefs/zip.xml
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java

Modified: ant/core/trunk/src/etc/testcases/taskdefs/zip.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/zip.xml?rev=677871&r1=677870&r2=677871&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/zip.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/zip.xml Fri Jul 18 03:20:36 2008
@@ -260,6 +260,14 @@
     </zip>
   </target>
 
+  <target name="testForBugzilla34764">
+    <mkdir dir="ziptest"/>
+    <touch file="ziptest/file1"/>
+    <zip destfile="test3.zip" basedir="ziptest"/>
+    <touch file="ziptest/file2"/>
+    <zip destfile="test3.zip" basedir="ziptest" update="true"/>
+  </target>
+
   <target name="cleanup">
     <delete file="testLevel.zip"/>
     <delete file="test3.zip"/>

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java?rev=677871&r1=677870&r2=677871&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/ZipTest.java Fri Jul 18 03:20:36
2008
@@ -219,4 +219,19 @@
         }
     }
 
+    public void testForBugzilla34764() throws IOException {
+        executeTarget("testForBugzilla34764");
+        org.apache.tools.zip.ZipFile zf = null;
+        try {
+            zf = new org.apache.tools.zip.ZipFile(getProject()
+                                                  .resolveFile("test3.zip"));
+            org.apache.tools.zip.ZipEntry ze = zf.getEntry("file1");
+            assertEquals(UnixStat.FILE_FLAG | 0644, ze.getUnixMode());
+        } finally {
+            if (zf != null) {
+                zf.close();
+            }
+        }
+    }
+
 }



Mime
View raw message