source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/src/etc/testcases/taskdefs/concat.xml@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 4.8 KB
Line 
1<?xml version="1.0"?>
2
3<project name="concat-test" basedir="." default="test1">
4
5 <property name="tmp.file" value="concat.tmp" />
6 <property name="tmp.file.2" value="concat.tmp.2" />
7
8 <property name="world" value="World" />
9
10 <target name="cleanup">
11 <delete file="TESTDEST"/>
12 <delete file="${tmp.file}"/>
13 <delete file="${tmp.file.2}"/>
14 <delete file="concat.line4"/>
15 <delete file="concat.noeol"/>
16 <delete file="concat.linecr"/>
17 <delete file="concat.utf8"/>
18 </target>
19
20 <target name="test1">
21 <concat>
22 </concat>
23 </target>
24
25 <target name="test2">
26 <concat destfile="">Hello, ${world}!</concat>
27 </target>
28
29 <target name="test3">
30 <concat destfile="${tmp.file}">Hello, ${world}!</concat>
31 </target>
32
33 <target name="test4">
34 <concat destfile="${tmp.file.2}">
35 <fileset dir="${basedir}" includes="${tmp.file}" />
36 <filelist dir="${basedir}" files="${tmp.file},${tmp.file}" />
37 </concat>
38 </target>
39
40 <target name="test5">
41 <concat>Hello, ${world}!</concat>
42 </target>
43
44 <target name="test6">
45 <concat destfile="TESTDEST" append="true">
46 <filelist dir="${basedir}" files="thisfiledoesnotexist"/>
47 </concat>
48 <available file="TESTDEST" property="TESTDEST.was.created"/>
49 <fail message="TESTDEST created for nonexistant files"
50 if="TESTDEST.was.created"/>
51 </target>
52
53 <target name="testConcatNoNewline">
54 <concat>
55 <fileset dir="concat-input"/>
56 </concat>
57 </target>
58
59 <target name="testConcatNoNewlineEncoding">
60 <concat encoding="ASCII">
61 <fileset dir="concat-input"/>
62 </concat>
63 </target>
64
65 <target name="testPath">
66 <concat destfile="${tmp.file.2}">
67 <path path="${tmp.file}"/>
68 </concat>
69 </target>
70
71 <target name="testAppend">
72 <concat destfile="${tmp.file.2}">
73 <path path="${tmp.file}"/>
74 </concat>
75 <concat destfile="${tmp.file.2}" append="true">
76 <path path="${tmp.file}"/>
77 </concat>
78 </target>
79
80 <target name="testfilter">
81 <concat destfile="${tmp.file}">@REPLACEME@</concat>
82 <concat>
83 <path path="${tmp.file}"/>
84 <filterchain>
85 <replacetokens>
86 <token key="REPLACEME" value="REPLACED"/>
87 </replacetokens>
88 </filterchain>
89 </concat>
90 </target>
91
92 <target name="testnooverwrite">
93 <touch file="${tmp.file.2}"/>
94 <!-- concat.xml is now older than tmp.file.2
95 so the following should not do anything -->
96 <concat destfile="${tmp.file.2}" force="false">
97 <path path="concat.xml"/>
98 </concat>
99 </target>
100
101 <target name="testheaderfooter">
102 <concat>
103 <header filtering="false" trim="yes">
104 header
105 </header>
106 <path path="${tmp.file}"/>
107 <footer filtering="no">footer</footer>
108 </concat>
109 </target>
110
111 <target name="testfileheader">
112 <concat>
113 <header file="${tmp.file}"/>
114 <path path="${tmp.file}"/>
115 </concat>
116 </target>
117
118 <target name="samefile">
119 <touch file="${tmp.file}"/>
120 <concat destfile="${tmp.file}">
121 <path path="${tmp.file}"/>
122 </concat>
123 </target>
124
125 <target name="testfilterinline">
126 <concat>
127 @REPLACEME@
128 <filterchain>
129 <replacetokens>
130 <token key="REPLACEME" value="REPLACED"/>
131 </replacetokens>
132 </filterchain>
133 </concat>
134 </target>
135
136 <target name="testmultireader">
137 <concat destfile="${tmp.file}">Hello, World
138 </concat>
139 <concat destfile="${tmp.file.2}">Bye, World
140 </concat>
141 <concat>
142 <path path="${tmp.file}"/>
143 <path path="${tmp.file}"/>
144 <path path="${tmp.file}"/>
145 <path path="${tmp.file}"/>
146 <path path="${tmp.file}"/>
147 <path path="${tmp.file}"/>
148 <path path="${tmp.file}"/>
149 <path path="${tmp.file}"/>
150 <path path="${tmp.file}"/>
151 <!-- tailfilter seems to behave a little stange, place two
152 here in case the implementation changes -->
153 <path path="${tmp.file.2}"/>
154 <path path="${tmp.file.2}"/>
155 <filterchain>
156 <tailfilter lines="2"/>
157 </filterchain>
158 </concat>
159 </target>
160
161 <target name="create-noel">
162 <concat destfile="concat.noeol">This has no end of line</concat>
163 </target>
164
165 <target name="testfixlastline" depends="create-noel">
166 <concat destfile="concat.line4" fixlastline="yes">
167 <path path="concat.noeol"/>
168 <path path="concat.noeol"/>
169 <path path="concat.noeol"/>
170 <path path="concat.noeol"/>
171 </concat>
172 </target>
173
174 <target name="testfixlastlineeol" depends="create-noel">
175 <concat destfile="concat.linecr" fixlastline="yes" eol="mac">
176 <path path="concat.noeol"/>
177 <path path="concat.noeol"/>
178 </concat>
179 </target>
180
181 <target name="testTranscoding">
182 <concat destfile="concat.utf8"
183 encoding="ISO8859_1" outputencoding="UTF8">
184 <path path="copy/input/iso8859-1"/>
185 </concat>
186 </target>
187
188</project>
Note: See TracBrowser for help on using the repository browser.