File: TouchTaskTest.xml

package info (click to toggle)
phing 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,868 kB
  • sloc: php: 59,850; xml: 9,713; sql: 78; makefile: 39; sh: 14
file content (112 lines) | stat: -rw-r--r-- 3,343 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<project name="TouchTaskTest" default="main">
    <property name="tmp.dir" value="tmp"/>

    <tstamp>
        <format property="formattedTimestamp" pattern="MM/dd/yyyy hh:mm a" /> <!-- MM/DD/YYYY HH:MM AM or PM /> -->
    </tstamp>

    <selector id="map.selector">
        <date datetime="${formattedTimestamp}" />
    </selector>

    <target name="setup">
        <mkdir dir="${tmp.dir}"/>
    </target>

    <target name="clean">
        <delete dir="${tmp.dir}"/>
    </target>

    <target name="testSimpleTouch">
        <touch file="${tmp.dir}/simple-file"/>
    </target>

    <target name="testMkdirs">
        <touch file="${tmp.dir}/this/is/a/test/file" mkdirs="true"/>
    </target>

    <target name="testMkdirsFails">
        <touch file="${tmp.dir}/this/is/a/test/file"/>
    </target>

    <target name="testFilelist">
        <touch datetime="${formattedTimestamp}">
            <filelist dir="${tmp.dir}" files="simple-file"/>
        </touch>
    </target>

    <target name="testFileset" depends="testSimpleTouch">
        <touch datetime="${formattedTimestamp}" >
            <fileset dir="${tmp.dir}" includes="simple-file"/>
        </touch>
    </target>

    <target name="testMappedFileset">
        <touch file="${tmp.dir}/touchtest" datetime="${formattedTimestamp}" />
        <touch>
            <fileset file="${tmp.dir}/touchtest" />
            <mapper type="composite">
                <mapper type="glob" from="*" to="*foo" />
                <mapper type="glob" from="*" to="*bar" />
            </mapper>
        </touch>
    </target>

    <target name="testMappedFilelist">
        <touch datetime="${formattedTimestamp}">
            <filelist dir="." files="${tmp.dir}/idonotexist" />
            <mapper type="merge" to="${tmp.dir}/touchtest" />
        </touch>
    </target>

    <target name="testMillis">
        <touch file="${tmp.dir}/millis-file" millis="946684799864" /> <!-- Friday, December 31, 1999 11:59:59.864 PM -->
    </target>

    <target name="testSeconds">
        <touch file="${tmp.dir}/seconds-file" seconds="946684799" /> <!-- Friday, December 31, 1999 11:59:59 PM -->
    </target>

    <target name="testDatetime">
        <touch file="${tmp.dir}/datetime-file" datetime="12/31/1999 11:59:59 PM" />
    </target>

    <target name="testNotDateTime">
        <touch file="${tmp.dir}/not-a-datetime" datetime="Not A DateTime" />
    </target>

    <target name="testNoFile">
        <touch />
    </target>

    <target name="testFileIsDirectory">
        <touch file="${tmp.dir}" />
    </target>

    <target name="testMillisNegative">
        <touch file="${tmp.dir}/millis-file" millis="-684799864" />
    </target>

    <target name="testSecondsNegative">
        <touch file="${tmp.dir}/seconds-file" millis="-689864" />
    </target>

    <target name="testDatetimePreEpoch">
        <touch file="${tmp.dir}/datetime-file" datetime="10/28/1965 10:00:00 AM" />
    </target>

    <target name="testReadOnlyFile">
        <touch file="${readonly.file}" />
    </target>

    <target name="testMillisSubSecond">
        <touch file="${tmp.dir}/subsecond-file" millis="689" />
    </target>

    <target name="testDefaultToNow">
        <touch file="${tmp.dir}/default-now-file" />
    </target>

    <target name="main"/>
</project>