ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r398164 - in /ant/core/trunk/src: etc/testcases/taskdefs/unzip.xml testcases/org/apache/tools/ant/taskdefs/UnzipTest.java
Date Sat, 29 Apr 2006 14:45:27 GMT
Author: bodewig
Date: Sat Apr 29 07:45:25 2006
New Revision: 398164

URL: http://svn.apache.org/viewcvs?rev=398164&view=rev
Log:
tests for PR 38973

Modified:
    ant/core/trunk/src/etc/testcases/taskdefs/unzip.xml
    ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java

Modified: ant/core/trunk/src/etc/testcases/taskdefs/unzip.xml
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/unzip.xml?rev=398164&r1=398163&r2=398164&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/unzip.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/unzip.xml Sat Apr 29 07:45:25 2006
@@ -70,6 +70,28 @@
     </unzip>
   </target>
 
+  <target name="testTwoPatternSets" depends="prepareTestZip">
+    <unzip dest="unziptestout" src="unziptest.zip">
+      <patternset>
+        <include name="2/**"/>
+      </patternset>
+      <patternset>
+        <include name="3/**"/>
+      </patternset>
+    </unzip>
+  </target>
+
+  <target name="testTwoPatternSetsWithExcludes" depends="prepareTestZip">
+    <unzip dest="unziptestout" src="unziptest.zip">
+      <patternset>
+        <include name="2/**"/>
+      </patternset>
+      <patternset>
+        <exclude name="2/**"/>
+      </patternset>
+    </unzip>
+  </target>
+
   <target name="selfExtractingArchive">
     <mkdir dir="unziptestout"/>
     <unzip dest="unziptestout" src="zip/test.exe"/>

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java?rev=398164&r1=398163&r2=398164&view=diff
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java (original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java Sat Apr 29 07:45:25
2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -100,6 +100,24 @@
      */
     public void testPatternSetIncludeAndExclude() {
         executeTarget("testPatternSetIncludeAndExclude");
+        assertFileMissing("1/foo is not included", "unziptestout/1/foo");
+        assertFileMissing("2/bar is excluded", "unziptestout/2/bar");
+    }
+
+    /*
+     * PR 38973
+     */
+    public void testTwoPatternSets() {
+        executeTarget("testTwoPatternSets");
+        assertFileMissing("1/foo is not included", "unziptestout/1/foo");
+        assertFileExists("2/bar is included", "unziptestout/2/bar");
+    }
+
+    /*
+     * PR 38973
+     */
+    public void testTwoPatternSetsWithExcludes() {
+        executeTarget("testTwoPatternSetsWithExcludes");
         assertFileMissing("1/foo is not included", "unziptestout/1/foo");
         assertFileMissing("2/bar is excluded", "unziptestout/2/bar");
     }



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


Mime
View raw message