File: UpToDateTest.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 (37 lines) | stat: -rw-r--r-- 1,245 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
<?xml version="1.0"?>
<project name="UpToDateTaskTest" default="invalid">

    <property name="tmp.dir" value="./../../resources/tasks/system/UpToDateTask" />
    <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />

    <target name="invalid">
        <fail>This file should only be run via a testcase</fail>
    </target>

    <target name="overrideNoPropertySet" description="Ticket 559 - test whether property is updated">
        <touch file="${tmp.dir}/target.txt" />
        <echo>echo = ${prop}</echo>
        <uptodate 
            property="prop" 
            value="updated"
            srcfile="${tmp.dir}/source.txt"
            targetfile="${tmp.dir}/target.txt" >
        </uptodate>
        <echo>echo = ${prop}</echo>
	</target>

    <target name="overridePropertySet" description="Ticket 559 - test whether property is updated">
        <touch file="${tmp.dir}/target.txt" />
        <property name="prop" value="value exists"/>

        <echo>echo = ${prop}</echo>
        <uptodate 
            property="prop" 
            value="updated"
            srcfile="${tmp.dir}/source.txt"
            targetfile="${tmp.dir}/target.txt" >
        </uptodate>
        <echo>echo = ${prop}</echo>
	</target>

</project>