pptok: add rmacro/rimacro
[nasm/sigaren-mirror.git] / test / ifmacro.asm
blob53f3d2915fcb01a1b71c5ac59e6e3ebd14cfcd1e
1 ;Testname=test; Arguments=-fbin -oifmacro.txt; Files=stdout stderr ifmacro.txt
4 ; ifmacro.asm
6 ; Test of the new ifmacro directive
8 ; This file produces a human-readable text file when compiled
9 ; with -f bin
12 %define LF 10
14 %macro dummy 2
15 db 'This is a dummy macro, '
16 db 'arg1 = ', %1, ', '
17 db 'arg2 = ', %2, LF
18 %endmacro
20 dummy 'this', 'that'
22 %ifdef CR
23 db '%ifdef CR', LF
24 %endif
26 %ifdef LF
27 db '%ifdef LF', LF
28 %endif
30 %ifmacro dummy 1
31 db '%ifmacro dummy 1', LF
32 %endif
34 %ifmacro dummy 2
35 db '%ifmacro dummy 2', LF
36 %endif
38 %ifmacro dummy 3
39 db '%ifmacro dummy 3', LF
40 %endif
42 %ifmacro dummy 1+
43 db '%ifmacro dummy 1+', LF
44 %endif
46 %ifmacro dummy 2+
47 db '%ifmacro dummy 2+', LF
48 %endif
50 %ifmacro dummy 3+
51 db '%ifmacro dummy 3+', LF
52 %endif
54 %ifmacro dummy
55 db '%ifmacro dummy', LF
56 %endif
58 %ifmacro dummy 0-1
59 db '%ifmacro dummy 0-1', LF
60 %endif
62 %ifmacro dummy 1-2
63 db '%ifmacro dummy 1-2', LF
64 %endif
66 %ifmacro dummy 2-3
67 db '%ifmacro dummy 2-3', LF
68 %endif
70 %ifmacro dummy 3-4
71 db '%ifmacro dummy 3-4', LF
72 %endif
74 %ifmacro LF
75 db '%ifmacro LF', LF
76 %endif
78 %ifndef CR
79 db '%ifndef CR', LF
80 %endif
82 %ifndef LF
83 db '%ifndef LF', LF
84 %endif
86 %ifnmacro dummy 1
87 db '%ifnmacro dummy 1', LF
88 %endif
90 %ifnmacro dummy 2
91 db '%ifnmacro dummy 2', LF
92 %endif
94 %ifnmacro dummy 3
95 db '%ifnmacro dummy 3', LF
96 %endif
98 %ifnmacro dummy 1+
99 db '%ifnmacro dummy 1+', LF
100 %endif
102 %ifnmacro dummy 2+
103 db '%ifnmacro dummy 2+', LF
104 %endif
106 %ifnmacro dummy 3+
107 db '%ifnmacro dummy 3+', LF
108 %endif
110 %ifnmacro dummy
111 db '%ifnmacro dummy', LF
112 %endif
114 %ifnmacro dummy 0-1
115 db '%ifnmacro dummy 0-1', LF
116 %endif
118 %ifnmacro dummy 1-2
119 db '%ifnmacro dummy 1-2', LF
120 %endif
122 %ifnmacro dummy 2-3
123 db '%ifnmacro dummy 2-3', LF
124 %endif
126 %ifnmacro dummy 3-4
127 db '%ifnmacro dummy 3-4', LF
128 %endif
130 %ifnmacro LF
131 db '%ifnmacro LF', LF
132 %endif
134 %if 0
135 %elifdef CR
136 db '%elifdef CR', CR
137 %endif
139 %if 0
140 %elifdef LF
141 db '%elifdef LF', LF
142 %endif
144 %if 0
145 %elifmacro dummy 1
146 db '%elifmacro dummy 1', LF
147 %endif
149 %if 0
150 %elifmacro dummy 2
151 db '%elifmacro dummy 2', LF
152 %endif
154 %if 0
155 %elifmacro dummy 3
156 db '%elifmacro dummy 3', LF
157 %endif
159 %if 0
160 %elifmacro dummy 1+
161 db '%elifmacro dummy 1+', LF
162 %endif
164 %if 0
165 %elifmacro dummy 2+
166 db '%elifmacro dummy 2+', LF
167 %endif
169 %if 0
170 %elifmacro dummy 3+
171 db '%elifmacro dummy 3+', LF
172 %endif
174 %if 0
175 %elifmacro dummy
176 db '%elifmacro dummy', LF
177 %endif
179 %if 0
180 %elifmacro dummy 0-1
181 db '%elifmacro dummy 0-1', LF
182 %endif
184 %if 0
185 %elifmacro dummy 1-2
186 db '%elifmacro dummy 1-2', LF
187 %endif
189 %if 0
190 %elifmacro dummy 2-3
191 db '%elifmacro dummy 2-3', LF
192 %endif
194 %if 0
195 %elifmacro dummy 3-4
196 db '%elifmacro dummy 3-4', LF
197 %endif
199 %if 0
200 %elifmacro LF
201 db '%elifmacro LF', LF
202 %endif
204 %if 0
205 %elifndef CR
206 db '%elifndef CR', LF
207 %endif
209 %if 0
210 %elifndef LF
211 db '%elifndef LF', LF
212 %endif
214 %if 0
215 %elifnmacro dummy 1
216 db '%elifnmacro dummy 1', LF
217 %endif
219 %if 0
220 %elifnmacro dummy 2
221 db '%elifnmacro dummy 2', LF
222 %endif
224 %if 0
225 %elifnmacro dummy 3
226 db '%elifnmacro dummy 3', LF
227 %endif
229 %if 0
230 %elifnmacro dummy 1+
231 db '%elifnmacro dummy 1+', LF
232 %endif
234 %if 0
235 %elifnmacro dummy 2+
236 db '%elifnmacro dummy 2+', LF
237 %endif
239 %if 0
240 %elifnmacro dummy 3+
241 db '%elifnmacro dummy 3+', LF
242 %endif
244 %if 0
245 %elifnmacro dummy
246 db '%elifnmacro dummy', LF
247 %endif
249 %if 0
250 %elifnmacro dummy 0-1
251 db '%elifnmacro dummy 0-1', LF
252 %endif
254 %if 0
255 %elifnmacro dummy 1-2
256 db '%elifnmacro dummy 1-2', LF
257 %endif
259 %if 0
260 %elifnmacro dummy 2-3
261 db '%elifnmacro dummy 2-3', LF
262 %endif
264 %if 0
265 %elifnmacro dummy 3-4
266 db '%elifnmacro dummy 3-4', LF
267 %endif
269 %if 0
270 %elifnmacro LF
271 db '%elifnmacro LF', LF
272 %endif
274 %if 1
275 %elifdef CR
276 db 'bad %elifdef CR', LF
277 %endif
279 %if 1
280 %elifdef LF
281 db 'bad %elifdef LF', LF
282 %endif
284 %if 1
285 %elifmacro dummy 1
286 db 'bad %elifmacro dummy 1', LF
287 %endif
289 %if 1
290 %elifmacro dummy 2
291 db 'bad %elifmacro dummy 2', LF
292 %endif
294 %if 1
295 %elifmacro dummy 3
296 db 'bad %elifmacro dummy 3', LF
297 %endif
299 %if 1
300 %elifmacro dummy 1+
301 db 'bad %elifmacro dummy 1+', LF
302 %endif
304 %if 1
305 %elifmacro dummy 2+
306 db 'bad %elifmacro dummy 2+', LF
307 %endif
309 %if 1
310 %elifmacro dummy 3+
311 db 'bad %elifmacro dummy 3+', LF
312 %endif
314 %if 1
315 %elifmacro dummy
316 db 'bad %elifmacro dummy', LF
317 %endif
319 %if 1
320 %elifmacro dummy 0-1
321 db 'bad %elifmacro dummy 0-1', LF
322 %endif
324 %if 1
325 %elifmacro dummy 1-2
326 db 'bad %elifmacro dummy 1-2', LF
327 %endif
329 %if 1
330 %elifmacro dummy 2-3
331 db 'bad %elifmacro dummy 2-3', LF
332 %endif
334 %if 1
335 %elifmacro dummy 3-4
336 db 'bad %elifmacro dummy 3-4', LF
337 %endif
339 %if 1
340 %elifmacro LF
341 db 'bad %elifmacro LF', LF
342 %endif
344 %if 1
345 %elifndef CR
346 db 'bad %elifndef CR', LF
347 %endif
349 %if 1
350 %elifndef LF
351 db 'bad %elifndef LF', LF
352 %endif
354 %if 1
355 %elifnmacro dummy 1
356 db 'bad %elifnmacro dummy 1', LF
357 %endif
359 %if 1
360 %elifnmacro dummy 2
361 db 'bad %elifnmacro dummy 2', LF
362 %endif
364 %if 1
365 %elifnmacro dummy 3
366 db 'bad %elifnmacro dummy 3', LF
367 %endif
369 %if 1
370 %elifnmacro dummy 1+
371 db 'bad %elifnmacro dummy 1+', LF
372 %endif
374 %if 1
375 %elifnmacro dummy 2+
376 db 'bad %elifnmacro dummy 2+', LF
377 %endif
379 %if 1
380 %elifnmacro dummy 3+
381 db 'bad %elifnmacro dummy 3+', LF
382 %endif
384 %if 1
385 %elifnmacro dummy
386 db 'bad %elifnmacro dummy', LF
387 %endif
389 %if 1
390 %elifnmacro dummy 0-1
391 db 'bad %elifnmacro dummy 0-1', LF
392 %endif
394 %if 1
395 %elifnmacro dummy 1-2
396 db 'bad %elifnmacro dummy 1-2', LF
397 %endif
399 %if 1
400 %elifnmacro dummy 2-3
401 db 'bad %elifnmacro dummy 2-3', LF
402 %endif
404 %if 1
405 %elifnmacro dummy 3-4
406 db 'bad %elifnmacro dummy 3-4', LF
407 %endif
409 %if 1
410 %elifnmacro LF
411 db 'bad %elifnmacro LF', LF
412 %endif