File: IsFailureTest.xml

package info (click to toggle)
phing 3.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,328 kB
  • sloc: php: 59,826; xml: 9,770; sql: 78; makefile: 39; sh: 14
file content (22 lines) | stat: -rw-r--r-- 757 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="IsFailureTest" default="main">
    <target name="testFailureAfterNonExistingCommand">
        <exec executable="iwggfchwbwejhdeuu" returnProperty="return.code"/>
        <if>
            <isfailure code="${return.code}"/>
            <then>
                <echo msg="Command failed with return code ${return.code}"/>
            </then>
        </if>
    </target>
    <target name="testNoFailureWithZeroValue">
        <property name="return.code" value="0"/>
        <if>
            <isfailure code="${return.code}"/>
            <then>
                <echo msg="Command failed with return code ${return.code}"/>
            </then>
        </if>
    </target>
    <target name="main"/>
</project>