File: ApplyTest.xml

package info (click to toggle)
phing 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,340 kB
  • sloc: php: 59,826; xml: 9,770; sql: 78; makefile: 39; sh: 14
file content (258 lines) | stat: -rw-r--r-- 7,637 bytes parent folder | download | duplicates (3)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?xml version="1.0" encoding="UTF-8"?>
<project name="ApplyTaskTest" default="test">

  <if>
    <os family="mac">
    </os>
    <then>
      <property name="binPrefix" value="/usr/bin"/>
    </then>
    <else>
      <property name="binPrefix" value="/bin"/>
    </else>
  </if>

  <target name="testPropertySetOs">
    <apply executable="echo" os="linux" />
  </target>

  <target name="testPropertySetDir">
    <apply executable="echo" dir="${php.tmpdir}" />
  </target>

  <target name="testPropertySetEscape">
    <apply executable="echo" escape="true" />
  </target>

  <target name="testPropertySetPassthru">
    <apply executable="echo" passthru="true" />
  </target>

  <target name="testPropertySetSpawn">
    <apply executable="echo" spawn="true" />
  </target>

  <target name="testPropertySetReturnProperty">
    <apply executable="echo" returnProperty="retval" />
  </target>

  <target name="testPropertySetOutputProperty">
    <apply executable="echo" outputProperty="outval" />
  </target>

  <target name="testPropertySetCheckreturn">
    <apply executable="echo" failonerror="true" />
  </target>

  <target name="testPropertySetOutput">
    <apply executable="echo" output="${php.tmpdir}/outputfilename" />
  </target>

  <target name="testPropertySetError">
    <apply executable="echo" error="${php.tmpdir}/errorfilename" />
  </target>

  <target name="testPropertySetAppend">
    <apply executable="echo" append="true" />
  </target>

  <target name="testPropertySetParallel">
    <apply executable="echo" parallel="false" />
  </target>

  <target name="testPropertySetAddsourcefile">
    <apply executable="echo" addsourcefile="false" />
  </target>

  <target name="testPropertySetRelative">
    <apply executable="echo" relative="false" />
  </target>

  <target name="testPropertySetForwardslash">
    <apply executable="echo" forwardslash="true" />
  </target>

  <target name="testPropertySetMaxparallel">
    <apply executable="echo" parallel="true" maxparallel="10" />
  </target>


  <target name="testDoNotExecuteOnWrongOs">
    <apply executable="echo" os="unknownos" addsourcefile="false" >
      <arg value="'this should not be executed'" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testExecuteOnCorrectOs">
    <apply executable="echo" os="WINNT WIN32 Linux Darwin BSD" addsourcefile="false" >
      <arg value="this should be executed" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testFailOnNonExistingDir">
    <apply executable="echo" dir="${php.tmpdir}/non/existent/dir" >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testChangeToDir">
    <apply executable="ls" dir="${php.tmpdir}/" addsourcefile="false" >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testCheckreturnTrue">
    <apply executable="${binPrefix}/true" checkreturn="true" addsourcefile="false" >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testCheckreturnFalse">
    <apply executable="${binPrefix}/false" checkreturn="true" addsourcefile="false" >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testOutputProperty">
    <apply executable="echo" outputProperty="execOutputProp"  addsourcefile="false" parallel="true" >
      <arg value="foo" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
    <echo>The output property's value is: "${execOutputProp}"</echo>
  </target>

  <target name="testReturnProperty">
    <apply executable="${binPrefix}/false" returnProperty="execReturnProp"  addsourcefile="false" parallel="true">
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
    <echo>The return property's value is: "${execReturnProp}"</echo>
  </target>

  <target name="testEscape">
    <!-- 'Echo' combines multiple spaces, but not on MS Windows -->
    <apply executable="echo" escape="true" addsourcefile="false" parallel="true">
      <arg line="foo  | cat "/>
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testPassThru">
    <apply executable="${binPrefix}/true" passthru="true" addsourcefile="false" parallel="true">
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testOutput">
    <apply executable="echo" output="${execTmpFile}" addsourcefile="false" parallel="true">
      <arg value="outfoo" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testError">
    <apply executable="${executable}" error="${execTmpFile}" addsourcefile="false" parallel="true"  >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testSpawn">
    <apply executable="sleep" spawn="true" addsourcefile="false" parallel="true" >
      <arg value="5" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testNestedArgs">
    <apply executable="echo" addsourcefile="false" parallel="true" >
      <arg value="Hello" />
      <arg line="World" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testMissingExecutable">
    <apply></apply>
  </target>

  <target name="testEscapedArg">
    <apply executable="echo" escape="true" outputProperty="outval" addsourcefile="false" parallel="true">
      <arg value="abc$b3!SB" />
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testRelativeSourceFilenames">
    <apply executable="ls" dir="${phing.home}/etc" parallel="true" relative="true" >
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testSourceFilename">
    <apply executable="ls" dir="${phing.home}/etc" parallel="true" relative="true" addsourcefile="false">
      <fileset dir="${phing.home}/etc" >
        <include name="*.xsl" />
      </fileset>
    </apply>
  </target>

  <target name="testOutputAppend">
    <apply executable="echo" parallel="true" output="${execTmpFile}" append="true" addsourcefile="false" >
      <arg value="Append OK" />
      <fileset dir="${phing.home}/etc" ><include name="*.xsl" /></fileset>
      <fileset dir="${phing.home}/etc" ><include name="*.rng" /></fileset>
    </apply>
  </target>

  <target name="testParallel">
    <apply executable="echo" parallel="true" addsourcefile="false" >
      <arg value="Hello" />
      <fileset dir="${phing.home}/etc" ><include name="*.xsl" /></fileset>
    </apply>
  </target>

  <target name="testMapperSupport">
    <apply executable="echo" dest="." output="${execTmpFile}" append="true" addsourcefile="false" >
      <arg value="-c"/>
      <arg value="-o"/>
      <targetfile/>
      <srcfile/>
      <fileset dir="${phing.home}/etc" includes="*.xsl"/>
      <mapper type="glob" from="*.xsl" to="*.xml"/>
    </apply>
  </target>

</project>