File: ConditionTest.xml

package info (click to toggle)
phing 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,368 kB
  • sloc: php: 59,821; xml: 9,767; sql: 78; makefile: 39; sh: 14
file content (59 lines) | stat: -rw-r--r-- 1,814 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="UTF-8"?>
<project name="ConditionTaskTest" default="test">
    <target name="testEquals">
    	<condition property="isEquals">
    	    <equals arg1="String1" arg2="string1" casesensitive="false"/>
    	</condition>
    </target>
    
    <target name="testContains">
        <condition property="isContains">
            <contains string="Some dummy text" substring="dummy"/>
        </condition>
    </target>
    
    <target name="testCustomCondition">
    	<typedef name="testcondition" classname="TestCondition"/>
   	<condition property="isCustom">
	    <testcondition foo="bar"/>
    	</condition>
    </target>

    <target name="testReferenceExists">
        <condition property="ref.exists">
            <referenceexists ref="file.set"/>
        </condition>
        <echo>${ref.exists}</echo>
        <patternset id="file.set">
            <include name="build.xml"/>
        </patternset>
    </target>

    <target name="testSocketCondition">
        <condition property="socket">
            <socket server="localhost" port="1337" />
        </condition>
    </target>

    <target name="testMatches">
        <condition property="matches">
            <matches string="package.ABC.name" pattern="package\.([^.]*)\.name" casesensitive="false" />
        </condition>
    </target>

    <target name="testIsTrue">
        <property name="prop1" value="1" />
        <condition property="istrueEqOne">
            <istrue value="${prop1}"/>
        </condition>
        <property name="prop2" value="11" />
        <condition property="istrueEqEleven">
            <istrue value="${prop2}"/>
        </condition>
    </target>
    
    <target name="testZero">
        <property name="zero" value="0" />
        <property name="one" value="1" />
    </target>
</project>