git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274691 13f79535-47bb-0310-9956-ffa450edef68master
@@ -68,4 +68,14 @@ | |||||
<mkdir dir="unziptestout"/> | <mkdir dir="unziptestout"/> | ||||
<unzip dest="unziptestout" src="zip/test.exe"/> | <unzip dest="unziptestout" src="zip/test.exe"/> | ||||
</target> | </target> | ||||
<!-- Bugzilla Report 20969 --> | |||||
<target name="testPatternSetSlashOnly" depends="prepareTestZip"> | |||||
<unzip dest="unziptestout" src="unziptest.zip"> | |||||
<patternset> | |||||
<include name="2/"/> | |||||
</patternset> | |||||
</unzip> | |||||
</target> | |||||
</project> | </project> |
@@ -143,4 +143,16 @@ public class UnzipTest extends BuildFileTest { | |||||
+ "probably a self-extracting archive"); | + "probably a self-extracting archive"); | ||||
} | } | ||||
/* | |||||
* PR 20969 | |||||
*/ | |||||
public void testPatternSetSlashOnly() { | |||||
executeTarget("testPatternSetSlashOnly"); | |||||
assertTrue("1/foo is not included", | |||||
!getProject().resolveFile("unziptestout/1/foo").exists()); | |||||
assertTrue("2/bar is included", | |||||
getProject().resolveFile("unziptestout/2/bar").exists()); | |||||
} | |||||
} | } |