git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@677871 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -260,6 +260,14 @@ | |||||
| </zip> | </zip> | ||||
| </target> | </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"> | <target name="cleanup"> | ||||
| <delete file="testLevel.zip"/> | <delete file="testLevel.zip"/> | ||||
| <delete file="test3.zip"/> | <delete file="test3.zip"/> | ||||
| @@ -219,4 +219,19 @@ public class ZipTest extends BuildFileTest { | |||||
| } | } | ||||
| } | } | ||||
| 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(); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||