ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r528046 - /ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml
Date Thu, 12 Apr 2007 17:16:06 GMT
Author: mbenson
Date: Thu Apr 12 10:16:06 2007
New Revision: 528046

URL: http://svn.apache.org/viewvc?view=rev&rev=528046
Log:
add test

Added:
    ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml   (with props)

Added: ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml?view=auto&rev=528046
==============================================================================
--- ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml Thu Apr 12 10:16:06
2007
@@ -0,0 +1,49 @@
+<project default="all" xmlns:au="antlib:org.apache.ant.antunit">
+
+  <macrodef name="test">
+    <sequential>
+      <au:assertTrue>
+        <resourcecount count="0">
+          <intersect>
+            <fileset dir="${basedir}">
+              <patternset refid="plus" />
+            </fileset>
+            <fileset dir="${basedir}">
+              <patternset refid="minus" />
+            </fileset>
+          </intersect>
+        </resourcecount>
+      </au:assertTrue>
+    </sequential>
+  </macrodef>
+
+  <target name="testInvertNested">
+    <basename property="basename" file="${ant.file}" />
+    <echo>$${basename}=${basename}</echo>
+    <patternset id="plus" includes="${basename}" />
+    <patternset id="minus">
+      <invert>
+        <patternset refid="plus" />
+      </invert>
+    </patternset>
+    <test />
+  </target>
+
+  <target name="testInvertRefid">
+    <basename property="basename" file="${ant.file}" />
+    <echo>$${basename}=${basename}</echo>
+    <patternset id="plus" includes="${basename}" />
+    <patternset id="minus">
+      <invert refid="plus" />
+    </patternset>
+    <test />
+  </target>
+
+  <target name="all">
+    <au:antunit>
+      <fileset file="${ant.file}"/>
+      <au:plainlistener />
+    </au:antunit>
+  </target>
+
+</project>

Propchange: ant/core/trunk/src/tests/antunit/types/patternset-invert-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native



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


Mime
View raw message