summaryrefslogtreecommitdiffstats
path: root/test/antunit/property/propertyselector.xml
diff options
context:
space:
mode:
authormattinger <[email protected]>2007-01-10 18:20:53 +0000
committermattinger <[email protected]>2007-01-10 18:20:53 +0000
commit391a3b1becbcb9b778b8f86ff11793123ec04f78 (patch)
treedb1fb364d218df157b6fd5381f571b2680ed3e60 /test/antunit/property/propertyselector.xml
parent0ed6d4f5c09949a8e8f465ae707fa688083f9a99 (diff)
finishing property test.xml files.
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/branches/ant-1.7.0-upgrade@74 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'test/antunit/property/propertyselector.xml')
-rw-r--r--test/antunit/property/propertyselector.xml44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/antunit/property/propertyselector.xml b/test/antunit/property/propertyselector.xml
new file mode 100644
index 0000000..016f159
--- /dev/null
+++ b/test/antunit/property/propertyselector.xml
@@ -0,0 +1,44 @@
+<project name="propertycopy"
+ xmlns:au="antlib:org.apache.ant.antunit"
+ xmlns:antcontrib="antlib:net.sf.antcontrib">
+ <import file="../common.xml" />
+
+ <property name="module.Module1.id" value="1" />
+ <property name="module.Module1.name" value="Module 1" />
+ <property name="module.Module2.id" value="2" />
+ <property name="module.Module2.name" value="Module 2" />
+ <property name="module.Module2.foo.id" value="3" />
+ <property name="module.Module2.foo.name" value="Module 3" />
+
+ <target name="testGrouping0">
+ <antcontrib:propertyselector property="module.list"
+ match="module\.([^\.]*)\.id"
+ delimiter=","
+ casesensitive="false" />
+
+ <au:assertTrue>
+ <and>
+ <contains string="${module.list}" substring="module.Module1.id" />
+ <contains string="${module.list}" substring="module.Module2.id" />
+ <not><contains string="${module.list}" substring="module.Module3.foo.id" /></not>
+ </and>
+ </au:assertTrue>
+ </target>
+
+ <target name="testGrouping1">
+ <antcontrib:propertyselector property="module.list"
+ match="module\.([^\.]*)\.id"
+ select="\1"
+ delimiter=","
+ casesensitive="false" />
+ <au:assertTrue>
+ <and>
+ <not><contains string="${module.list}" substring="module." /></not>
+ <not><contains string="${module.list}" substring=".id" /></not>
+ <contains string="${module.list}" substring="Module1" />
+ <contains string="${module.list}" substring="Module2" />
+ <not><contains string="${module.list}" substring="Module3" /></not>
+ </and>
+ </au:assertTrue>
+ </target>
+</project> \ No newline at end of file