git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271871 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,63 +0,0 @@ | |||||
| <project version="2.0"> | |||||
| <target name="true-prop"> | |||||
| <property name="test-prop" value="true"/> | |||||
| <if test="test-prop"> | |||||
| <log>test-prop is set</log> | |||||
| </if> | |||||
| <if not-test="test-prop"> | |||||
| <log>test-prop is not set</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="set-prop"> | |||||
| <property name="test-prop" value="some value"/> | |||||
| <if test="test-prop"> | |||||
| <log>test-prop is set</log> | |||||
| </if> | |||||
| <if not-test="test-prop"> | |||||
| <log>test-prop is not set</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="not-set-prop"> | |||||
| <if test="test-prop"> | |||||
| <log>test-prop is set</log> | |||||
| </if> | |||||
| <if not-test="test-prop"> | |||||
| <log>test-prop is not set</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="false-prop"> | |||||
| <property name="test-prop" value="false"/> | |||||
| <if test="test-prop"> | |||||
| <log>test-prop is set</log> | |||||
| </if> | |||||
| <if not-test="test-prop"> | |||||
| <log>test-prop is not set</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="multiple-nested-tasks"> | |||||
| <property name="test-prop" value="true"/> | |||||
| <if test="test-prop"> | |||||
| <log>task 1</log> | |||||
| <log>task 2</log> | |||||
| <log>task 3</log> | |||||
| <log>task 4</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="no-condition"> | |||||
| <if> | |||||
| <log>no go</log> | |||||
| </if> | |||||
| </target> | |||||
| <target name="too-many-conditions"> | |||||
| <if test="test-prop" not-test="test-prop"> | |||||
| <log>no go</log> | |||||
| </if> | |||||
| </target> | |||||
| </project> | |||||
| @@ -1,65 +0,0 @@ | |||||
| <project version="2.0"> | |||||
| <!-- Test setting property via attribute --> | |||||
| <target name="set-attr"> | |||||
| <property name="test-prop" value="some value"/> | |||||
| <log>test-prop = [${test-prop}]</log> | |||||
| </target> | |||||
| <!-- Test setting property via content --> | |||||
| <target name="set-content"> | |||||
| <property name="test-prop2">some value</property> | |||||
| <log>test-prop2 = [${test-prop2}]</log> | |||||
| </target> | |||||
| <!-- Test setting property via a nested element --> | |||||
| <target name="set-element"> | |||||
| <property name="test-prop3"> | |||||
| <property-test-type value="some value"/> | |||||
| </property> | |||||
| <log>test-prop3 = [${test-prop3}]</log> | |||||
| </target> | |||||
| <!-- Test missing property name --> | |||||
| <target name="missing-name"> | |||||
| <property value="some value"/> | |||||
| </target> | |||||
| <!-- Test missing property value --> | |||||
| <target name="missing-value"> | |||||
| <property name="some-prop"/> | |||||
| </target> | |||||
| <!-- Test setting the value more than once --> | |||||
| <target name="too-many-values1"> | |||||
| <property name="some-prop" value="some value">another value</property> | |||||
| </target> | |||||
| <!-- Test setting the value more than once --> | |||||
| <target name="too-many-values2"> | |||||
| <property name="some-prop" value="some value"> | |||||
| <property-test-type value="value 2"/> | |||||
| </property> | |||||
| </target> | |||||
| <!-- Test setting the value more than once --> | |||||
| <target name="too-many-values3"> | |||||
| <property name="some-prop"> | |||||
| <property-test-type value="value 1"/> | |||||
| <property-test-type value="value 2"/> | |||||
| <property-test-type value="value 3"/> | |||||
| </property> | |||||
| </target> | |||||
| <!-- Test properties with invalid names --> | |||||
| <target name="bad-prop-name1"> | |||||
| <property name="badname!" value="value"/> | |||||
| </target> | |||||
| <target name="bad-prop-name2"> | |||||
| <property name="bad name" value="value"/> | |||||
| </target> | |||||
| <target name="bad-prop-name3"> | |||||
| <property name="" value="value"/> | |||||
| </target> | |||||
| </project> | |||||
| @@ -1,8 +0,0 @@ | |||||
| <project version="2.0"> | |||||
| <target name="copy"> | |||||
| <v-fileset id="src-files" dir="src"/> | |||||
| <v-copy destdir="dest"> | |||||
| <v-fileset-ref id="src-files"/> | |||||
| </v-copy> | |||||
| </target> | |||||
| </project> | |||||
| @@ -1 +0,0 @@ | |||||
| A test file. | |||||
| @@ -1,5 +0,0 @@ | |||||
| <html> | |||||
| <body> | |||||
| <p>Yo!</p> | |||||
| </body> | |||||
| </html> | |||||
| @@ -1,2 +0,0 @@ | |||||
| This is a test file. | |||||
| With 2 lines in it. | |||||
| @@ -1,4 +0,0 @@ | |||||
| <!-- Project with an invalid name --> | |||||
| <project version="2.0" name="!badname"> | |||||
| <target name="main"/> | |||||
| </project> | |||||
| @@ -1,5 +0,0 @@ | |||||
| <!-- Target with an invalid name --> | |||||
| <project version="2.0" name="ok name"> | |||||
| <target name="main"/> | |||||
| <target name="bad ^ name"/> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with invalid version --> | |||||
| <project version="ant2"> | |||||
| </project> | |||||
| @@ -1 +0,0 @@ | |||||
| this ain't xml. | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Use all the defaults --> | |||||
| <project version="2.0"> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with mismatched version --> | |||||
| <project version="1.0.2"> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with no version attribute --> | |||||
| <project> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with a non-default base directory --> | |||||
| <project version="2.0" basedir="other-base-dir"> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with a non-default default target --> | |||||
| <project version="2.0" default="some-target"> | |||||
| </project> | |||||
| @@ -1,3 +0,0 @@ | |||||
| <!-- Project with non-default name --> | |||||
| <project name="some-project" version="2.0"> | |||||
| </project > | |||||
| @@ -1,18 +0,0 @@ | |||||
| <ant-lib version="1.0"> | |||||
| <types> | |||||
| <!-- Register a data-type --> | |||||
| <data-type name="test-type1" | |||||
| classname="org.apache.myrmidon.components.deployer.TestType1"/> | |||||
| <!-- Register a custom role implementation --> | |||||
| <test-role1 name="test-type1" | |||||
| classname="org.apache.myrmidon.components.deployer.TestType1"/> | |||||
| <!-- Register a converter --> | |||||
| <converter classname="org.apache.myrmidon.components.deployer.TestConverter1" | |||||
| source="java.lang.String" | |||||
| destination="org.apache.myrmidon.components.deployer.TestType1"/> | |||||
| </types> | |||||
| </ant-lib> | |||||
| @@ -1,4 +0,0 @@ | |||||
| <roles version="1.0"> | |||||
| <!-- A custom role --> | |||||
| <role shorthand="test-role1" name="org.apache.myrmidon.components.deployer.TestRole1"/> | |||||
| </roles> | |||||
| @@ -1,6 +0,0 @@ | |||||
| <project version="2.0" name="test-project" default="main-target"> | |||||
| <property name="some-prop" value="some-value"/> | |||||
| <target name="main-target"> | |||||
| <log>A log message</log> | |||||
| </target> | |||||
| </project> | |||||