(rel-check): New rule.
[coreutils.git] / tests / tac / tac-tests
blob432bf7b804f03fe0805f996e363e3f4c3dbcad4d
1 #! /bin/sh
2 # This script was generated automatically by build-script.
3 case $# in
4 0) xx='../../src/tac';;
5 *) xx="$1";;
6 esac
7 test "$VERBOSE" && echo=echo || echo=:
8 $echo testing program: $xx
9 errors=0
10 test "$srcdir" || srcdir=.
11 test "$VERBOSE" && $xx --version 2> /dev/null
13 # Make sure we get English translations.
14 LANGUAGE=C
15 export LANGUAGE
16 LC_ALL=C
17 export LC_ALL
18 LANG=C
19 export LANG
21 $xx $srcdir/basic-0.I > basic-0.O 2> basic-0.E
22 code=$?
23 if test $code != 0 ; then
24 $echo "Test basic-0(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
25 errors=`expr $errors + 1`
26 else
27 cmp basic-0.O $srcdir/basic-0.X > /dev/null 2>&1
28 case $? in
29 0) if test "$VERBOSE" ; then $echo "passed basic-0(F)"; fi ;;
30 1) $echo "Test basic-0(F) failed: files basic-0.O and $srcdir/basic-0.X differ" 1>&2;
31 errors=`expr $errors + 1` ;;
32 2) $echo "Test basic-0(F) may have failed." 1>&2;
33 $echo The command "cmp basic-0.O $srcdir/basic-0.X" failed. 1>&2 ;
34 errors=`expr $errors + 1` ;;
35 esac
37 test -s basic-0.E || rm -f basic-0.E
38 cat $srcdir/basic-0.I | $xx > basic-0.O 2> basic-0.E
39 code=$?
40 if test $code != 0 ; then
41 $echo "Test basic-0(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
42 errors=`expr $errors + 1`
43 else
44 cmp basic-0.O $srcdir/basic-0.X > /dev/null 2>&1
45 case $? in
46 0) if test "$VERBOSE" ; then $echo "passed basic-0(|)"; fi ;;
47 1) $echo "Test basic-0(|) failed: files basic-0.O and $srcdir/basic-0.X differ" 1>&2;
48 errors=`expr $errors + 1` ;;
49 2) $echo "Test basic-0(|) may have failed." 1>&2;
50 $echo The command "cmp basic-0.O $srcdir/basic-0.X" failed. 1>&2 ;
51 errors=`expr $errors + 1` ;;
52 esac
54 test -s basic-0.E || rm -f basic-0.E
55 $xx < $srcdir/basic-0.I > basic-0.O 2> basic-0.E
56 code=$?
57 if test $code != 0 ; then
58 $echo "Test basic-0(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
59 errors=`expr $errors + 1`
60 else
61 cmp basic-0.O $srcdir/basic-0.X > /dev/null 2>&1
62 case $? in
63 0) if test "$VERBOSE" ; then $echo "passed basic-0(<)"; fi ;;
64 1) $echo "Test basic-0(<) failed: files basic-0.O and $srcdir/basic-0.X differ" 1>&2;
65 errors=`expr $errors + 1` ;;
66 2) $echo "Test basic-0(<) may have failed." 1>&2;
67 $echo The command "cmp basic-0.O $srcdir/basic-0.X" failed. 1>&2 ;
68 errors=`expr $errors + 1` ;;
69 esac
71 test -s basic-0.E || rm -f basic-0.E
72 $xx $srcdir/basic-b.I > basic-b.O 2> basic-b.E
73 code=$?
74 if test $code != 0 ; then
75 $echo "Test basic-b(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
76 errors=`expr $errors + 1`
77 else
78 cmp basic-b.O $srcdir/basic-b.X > /dev/null 2>&1
79 case $? in
80 0) if test "$VERBOSE" ; then $echo "passed basic-b(F)"; fi ;;
81 1) $echo "Test basic-b(F) failed: files basic-b.O and $srcdir/basic-b.X differ" 1>&2;
82 errors=`expr $errors + 1` ;;
83 2) $echo "Test basic-b(F) may have failed." 1>&2;
84 $echo The command "cmp basic-b.O $srcdir/basic-b.X" failed. 1>&2 ;
85 errors=`expr $errors + 1` ;;
86 esac
88 test -s basic-b.E || rm -f basic-b.E
89 cat $srcdir/basic-b.I | $xx > basic-b.O 2> basic-b.E
90 code=$?
91 if test $code != 0 ; then
92 $echo "Test basic-b(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
93 errors=`expr $errors + 1`
94 else
95 cmp basic-b.O $srcdir/basic-b.X > /dev/null 2>&1
96 case $? in
97 0) if test "$VERBOSE" ; then $echo "passed basic-b(|)"; fi ;;
98 1) $echo "Test basic-b(|) failed: files basic-b.O and $srcdir/basic-b.X differ" 1>&2;
99 errors=`expr $errors + 1` ;;
100 2) $echo "Test basic-b(|) may have failed." 1>&2;
101 $echo The command "cmp basic-b.O $srcdir/basic-b.X" failed. 1>&2 ;
102 errors=`expr $errors + 1` ;;
103 esac
105 test -s basic-b.E || rm -f basic-b.E
106 $xx < $srcdir/basic-b.I > basic-b.O 2> basic-b.E
107 code=$?
108 if test $code != 0 ; then
109 $echo "Test basic-b(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
110 errors=`expr $errors + 1`
111 else
112 cmp basic-b.O $srcdir/basic-b.X > /dev/null 2>&1
113 case $? in
114 0) if test "$VERBOSE" ; then $echo "passed basic-b(<)"; fi ;;
115 1) $echo "Test basic-b(<) failed: files basic-b.O and $srcdir/basic-b.X differ" 1>&2;
116 errors=`expr $errors + 1` ;;
117 2) $echo "Test basic-b(<) may have failed." 1>&2;
118 $echo The command "cmp basic-b.O $srcdir/basic-b.X" failed. 1>&2 ;
119 errors=`expr $errors + 1` ;;
120 esac
122 test -s basic-b.E || rm -f basic-b.E
123 $xx $srcdir/basic-c.I > basic-c.O 2> basic-c.E
124 code=$?
125 if test $code != 0 ; then
126 $echo "Test basic-c(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
127 errors=`expr $errors + 1`
128 else
129 cmp basic-c.O $srcdir/basic-c.X > /dev/null 2>&1
130 case $? in
131 0) if test "$VERBOSE" ; then $echo "passed basic-c(F)"; fi ;;
132 1) $echo "Test basic-c(F) failed: files basic-c.O and $srcdir/basic-c.X differ" 1>&2;
133 errors=`expr $errors + 1` ;;
134 2) $echo "Test basic-c(F) may have failed." 1>&2;
135 $echo The command "cmp basic-c.O $srcdir/basic-c.X" failed. 1>&2 ;
136 errors=`expr $errors + 1` ;;
137 esac
139 test -s basic-c.E || rm -f basic-c.E
140 cat $srcdir/basic-c.I | $xx > basic-c.O 2> basic-c.E
141 code=$?
142 if test $code != 0 ; then
143 $echo "Test basic-c(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
144 errors=`expr $errors + 1`
145 else
146 cmp basic-c.O $srcdir/basic-c.X > /dev/null 2>&1
147 case $? in
148 0) if test "$VERBOSE" ; then $echo "passed basic-c(|)"; fi ;;
149 1) $echo "Test basic-c(|) failed: files basic-c.O and $srcdir/basic-c.X differ" 1>&2;
150 errors=`expr $errors + 1` ;;
151 2) $echo "Test basic-c(|) may have failed." 1>&2;
152 $echo The command "cmp basic-c.O $srcdir/basic-c.X" failed. 1>&2 ;
153 errors=`expr $errors + 1` ;;
154 esac
156 test -s basic-c.E || rm -f basic-c.E
157 $xx < $srcdir/basic-c.I > basic-c.O 2> basic-c.E
158 code=$?
159 if test $code != 0 ; then
160 $echo "Test basic-c(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
161 errors=`expr $errors + 1`
162 else
163 cmp basic-c.O $srcdir/basic-c.X > /dev/null 2>&1
164 case $? in
165 0) if test "$VERBOSE" ; then $echo "passed basic-c(<)"; fi ;;
166 1) $echo "Test basic-c(<) failed: files basic-c.O and $srcdir/basic-c.X differ" 1>&2;
167 errors=`expr $errors + 1` ;;
168 2) $echo "Test basic-c(<) may have failed." 1>&2;
169 $echo The command "cmp basic-c.O $srcdir/basic-c.X" failed. 1>&2 ;
170 errors=`expr $errors + 1` ;;
171 esac
173 test -s basic-c.E || rm -f basic-c.E
174 $xx $srcdir/basic-e.I > basic-e.O 2> basic-e.E
175 code=$?
176 if test $code != 0 ; then
177 $echo "Test basic-e(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
178 errors=`expr $errors + 1`
179 else
180 cmp basic-e.O $srcdir/basic-e.X > /dev/null 2>&1
181 case $? in
182 0) if test "$VERBOSE" ; then $echo "passed basic-e(F)"; fi ;;
183 1) $echo "Test basic-e(F) failed: files basic-e.O and $srcdir/basic-e.X differ" 1>&2;
184 errors=`expr $errors + 1` ;;
185 2) $echo "Test basic-e(F) may have failed." 1>&2;
186 $echo The command "cmp basic-e.O $srcdir/basic-e.X" failed. 1>&2 ;
187 errors=`expr $errors + 1` ;;
188 esac
190 test -s basic-e.E || rm -f basic-e.E
191 cat $srcdir/basic-e.I | $xx > basic-e.O 2> basic-e.E
192 code=$?
193 if test $code != 0 ; then
194 $echo "Test basic-e(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
195 errors=`expr $errors + 1`
196 else
197 cmp basic-e.O $srcdir/basic-e.X > /dev/null 2>&1
198 case $? in
199 0) if test "$VERBOSE" ; then $echo "passed basic-e(|)"; fi ;;
200 1) $echo "Test basic-e(|) failed: files basic-e.O and $srcdir/basic-e.X differ" 1>&2;
201 errors=`expr $errors + 1` ;;
202 2) $echo "Test basic-e(|) may have failed." 1>&2;
203 $echo The command "cmp basic-e.O $srcdir/basic-e.X" failed. 1>&2 ;
204 errors=`expr $errors + 1` ;;
205 esac
207 test -s basic-e.E || rm -f basic-e.E
208 $xx < $srcdir/basic-e.I > basic-e.O 2> basic-e.E
209 code=$?
210 if test $code != 0 ; then
211 $echo "Test basic-e(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
212 errors=`expr $errors + 1`
213 else
214 cmp basic-e.O $srcdir/basic-e.X > /dev/null 2>&1
215 case $? in
216 0) if test "$VERBOSE" ; then $echo "passed basic-e(<)"; fi ;;
217 1) $echo "Test basic-e(<) failed: files basic-e.O and $srcdir/basic-e.X differ" 1>&2;
218 errors=`expr $errors + 1` ;;
219 2) $echo "Test basic-e(<) may have failed." 1>&2;
220 $echo The command "cmp basic-e.O $srcdir/basic-e.X" failed. 1>&2 ;
221 errors=`expr $errors + 1` ;;
222 esac
224 test -s basic-e.E || rm -f basic-e.E
225 $xx $srcdir/basic-f.I > basic-f.O 2> basic-f.E
226 code=$?
227 if test $code != 0 ; then
228 $echo "Test basic-f(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
229 errors=`expr $errors + 1`
230 else
231 cmp basic-f.O $srcdir/basic-f.X > /dev/null 2>&1
232 case $? in
233 0) if test "$VERBOSE" ; then $echo "passed basic-f(F)"; fi ;;
234 1) $echo "Test basic-f(F) failed: files basic-f.O and $srcdir/basic-f.X differ" 1>&2;
235 errors=`expr $errors + 1` ;;
236 2) $echo "Test basic-f(F) may have failed." 1>&2;
237 $echo The command "cmp basic-f.O $srcdir/basic-f.X" failed. 1>&2 ;
238 errors=`expr $errors + 1` ;;
239 esac
241 test -s basic-f.E || rm -f basic-f.E
242 cat $srcdir/basic-f.I | $xx > basic-f.O 2> basic-f.E
243 code=$?
244 if test $code != 0 ; then
245 $echo "Test basic-f(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
246 errors=`expr $errors + 1`
247 else
248 cmp basic-f.O $srcdir/basic-f.X > /dev/null 2>&1
249 case $? in
250 0) if test "$VERBOSE" ; then $echo "passed basic-f(|)"; fi ;;
251 1) $echo "Test basic-f(|) failed: files basic-f.O and $srcdir/basic-f.X differ" 1>&2;
252 errors=`expr $errors + 1` ;;
253 2) $echo "Test basic-f(|) may have failed." 1>&2;
254 $echo The command "cmp basic-f.O $srcdir/basic-f.X" failed. 1>&2 ;
255 errors=`expr $errors + 1` ;;
256 esac
258 test -s basic-f.E || rm -f basic-f.E
259 $xx < $srcdir/basic-f.I > basic-f.O 2> basic-f.E
260 code=$?
261 if test $code != 0 ; then
262 $echo "Test basic-f(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
263 errors=`expr $errors + 1`
264 else
265 cmp basic-f.O $srcdir/basic-f.X > /dev/null 2>&1
266 case $? in
267 0) if test "$VERBOSE" ; then $echo "passed basic-f(<)"; fi ;;
268 1) $echo "Test basic-f(<) failed: files basic-f.O and $srcdir/basic-f.X differ" 1>&2;
269 errors=`expr $errors + 1` ;;
270 2) $echo "Test basic-f(<) may have failed." 1>&2;
271 $echo The command "cmp basic-f.O $srcdir/basic-f.X" failed. 1>&2 ;
272 errors=`expr $errors + 1` ;;
273 esac
275 test -s basic-f.E || rm -f basic-f.E
276 $xx $srcdir/basic-g.I > basic-g.O 2> basic-g.E
277 code=$?
278 if test $code != 0 ; then
279 $echo "Test basic-g(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
280 errors=`expr $errors + 1`
281 else
282 cmp basic-g.O $srcdir/basic-g.X > /dev/null 2>&1
283 case $? in
284 0) if test "$VERBOSE" ; then $echo "passed basic-g(F)"; fi ;;
285 1) $echo "Test basic-g(F) failed: files basic-g.O and $srcdir/basic-g.X differ" 1>&2;
286 errors=`expr $errors + 1` ;;
287 2) $echo "Test basic-g(F) may have failed." 1>&2;
288 $echo The command "cmp basic-g.O $srcdir/basic-g.X" failed. 1>&2 ;
289 errors=`expr $errors + 1` ;;
290 esac
292 test -s basic-g.E || rm -f basic-g.E
293 cat $srcdir/basic-g.I | $xx > basic-g.O 2> basic-g.E
294 code=$?
295 if test $code != 0 ; then
296 $echo "Test basic-g(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
297 errors=`expr $errors + 1`
298 else
299 cmp basic-g.O $srcdir/basic-g.X > /dev/null 2>&1
300 case $? in
301 0) if test "$VERBOSE" ; then $echo "passed basic-g(|)"; fi ;;
302 1) $echo "Test basic-g(|) failed: files basic-g.O and $srcdir/basic-g.X differ" 1>&2;
303 errors=`expr $errors + 1` ;;
304 2) $echo "Test basic-g(|) may have failed." 1>&2;
305 $echo The command "cmp basic-g.O $srcdir/basic-g.X" failed. 1>&2 ;
306 errors=`expr $errors + 1` ;;
307 esac
309 test -s basic-g.E || rm -f basic-g.E
310 $xx < $srcdir/basic-g.I > basic-g.O 2> basic-g.E
311 code=$?
312 if test $code != 0 ; then
313 $echo "Test basic-g(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
314 errors=`expr $errors + 1`
315 else
316 cmp basic-g.O $srcdir/basic-g.X > /dev/null 2>&1
317 case $? in
318 0) if test "$VERBOSE" ; then $echo "passed basic-g(<)"; fi ;;
319 1) $echo "Test basic-g(<) failed: files basic-g.O and $srcdir/basic-g.X differ" 1>&2;
320 errors=`expr $errors + 1` ;;
321 2) $echo "Test basic-g(<) may have failed." 1>&2;
322 $echo The command "cmp basic-g.O $srcdir/basic-g.X" failed. 1>&2 ;
323 errors=`expr $errors + 1` ;;
324 esac
326 test -s basic-g.E || rm -f basic-g.E
327 $xx $srcdir/basic-h.I > basic-h.O 2> basic-h.E
328 code=$?
329 if test $code != 0 ; then
330 $echo "Test basic-h(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
331 errors=`expr $errors + 1`
332 else
333 cmp basic-h.O $srcdir/basic-h.X > /dev/null 2>&1
334 case $? in
335 0) if test "$VERBOSE" ; then $echo "passed basic-h(F)"; fi ;;
336 1) $echo "Test basic-h(F) failed: files basic-h.O and $srcdir/basic-h.X differ" 1>&2;
337 errors=`expr $errors + 1` ;;
338 2) $echo "Test basic-h(F) may have failed." 1>&2;
339 $echo The command "cmp basic-h.O $srcdir/basic-h.X" failed. 1>&2 ;
340 errors=`expr $errors + 1` ;;
341 esac
343 test -s basic-h.E || rm -f basic-h.E
344 cat $srcdir/basic-h.I | $xx > basic-h.O 2> basic-h.E
345 code=$?
346 if test $code != 0 ; then
347 $echo "Test basic-h(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
348 errors=`expr $errors + 1`
349 else
350 cmp basic-h.O $srcdir/basic-h.X > /dev/null 2>&1
351 case $? in
352 0) if test "$VERBOSE" ; then $echo "passed basic-h(|)"; fi ;;
353 1) $echo "Test basic-h(|) failed: files basic-h.O and $srcdir/basic-h.X differ" 1>&2;
354 errors=`expr $errors + 1` ;;
355 2) $echo "Test basic-h(|) may have failed." 1>&2;
356 $echo The command "cmp basic-h.O $srcdir/basic-h.X" failed. 1>&2 ;
357 errors=`expr $errors + 1` ;;
358 esac
360 test -s basic-h.E || rm -f basic-h.E
361 $xx < $srcdir/basic-h.I > basic-h.O 2> basic-h.E
362 code=$?
363 if test $code != 0 ; then
364 $echo "Test basic-h(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
365 errors=`expr $errors + 1`
366 else
367 cmp basic-h.O $srcdir/basic-h.X > /dev/null 2>&1
368 case $? in
369 0) if test "$VERBOSE" ; then $echo "passed basic-h(<)"; fi ;;
370 1) $echo "Test basic-h(<) failed: files basic-h.O and $srcdir/basic-h.X differ" 1>&2;
371 errors=`expr $errors + 1` ;;
372 2) $echo "Test basic-h(<) may have failed." 1>&2;
373 $echo The command "cmp basic-h.O $srcdir/basic-h.X" failed. 1>&2 ;
374 errors=`expr $errors + 1` ;;
375 esac
377 test -s basic-h.E || rm -f basic-h.E
378 $xx $srcdir/basic-i.I > basic-i.O 2> basic-i.E
379 code=$?
380 if test $code != 0 ; then
381 $echo "Test basic-i(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
382 errors=`expr $errors + 1`
383 else
384 cmp basic-i.O $srcdir/basic-i.X > /dev/null 2>&1
385 case $? in
386 0) if test "$VERBOSE" ; then $echo "passed basic-i(F)"; fi ;;
387 1) $echo "Test basic-i(F) failed: files basic-i.O and $srcdir/basic-i.X differ" 1>&2;
388 errors=`expr $errors + 1` ;;
389 2) $echo "Test basic-i(F) may have failed." 1>&2;
390 $echo The command "cmp basic-i.O $srcdir/basic-i.X" failed. 1>&2 ;
391 errors=`expr $errors + 1` ;;
392 esac
394 test -s basic-i.E || rm -f basic-i.E
395 cat $srcdir/basic-i.I | $xx > basic-i.O 2> basic-i.E
396 code=$?
397 if test $code != 0 ; then
398 $echo "Test basic-i(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
399 errors=`expr $errors + 1`
400 else
401 cmp basic-i.O $srcdir/basic-i.X > /dev/null 2>&1
402 case $? in
403 0) if test "$VERBOSE" ; then $echo "passed basic-i(|)"; fi ;;
404 1) $echo "Test basic-i(|) failed: files basic-i.O and $srcdir/basic-i.X differ" 1>&2;
405 errors=`expr $errors + 1` ;;
406 2) $echo "Test basic-i(|) may have failed." 1>&2;
407 $echo The command "cmp basic-i.O $srcdir/basic-i.X" failed. 1>&2 ;
408 errors=`expr $errors + 1` ;;
409 esac
411 test -s basic-i.E || rm -f basic-i.E
412 $xx < $srcdir/basic-i.I > basic-i.O 2> basic-i.E
413 code=$?
414 if test $code != 0 ; then
415 $echo "Test basic-i(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
416 errors=`expr $errors + 1`
417 else
418 cmp basic-i.O $srcdir/basic-i.X > /dev/null 2>&1
419 case $? in
420 0) if test "$VERBOSE" ; then $echo "passed basic-i(<)"; fi ;;
421 1) $echo "Test basic-i(<) failed: files basic-i.O and $srcdir/basic-i.X differ" 1>&2;
422 errors=`expr $errors + 1` ;;
423 2) $echo "Test basic-i(<) may have failed." 1>&2;
424 $echo The command "cmp basic-i.O $srcdir/basic-i.X" failed. 1>&2 ;
425 errors=`expr $errors + 1` ;;
426 esac
428 test -s basic-i.E || rm -f basic-i.E
429 $xx $srcdir/basic-j.I > basic-j.O 2> basic-j.E
430 code=$?
431 if test $code != 0 ; then
432 $echo "Test basic-j(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
433 errors=`expr $errors + 1`
434 else
435 cmp basic-j.O $srcdir/basic-j.X > /dev/null 2>&1
436 case $? in
437 0) if test "$VERBOSE" ; then $echo "passed basic-j(F)"; fi ;;
438 1) $echo "Test basic-j(F) failed: files basic-j.O and $srcdir/basic-j.X differ" 1>&2;
439 errors=`expr $errors + 1` ;;
440 2) $echo "Test basic-j(F) may have failed." 1>&2;
441 $echo The command "cmp basic-j.O $srcdir/basic-j.X" failed. 1>&2 ;
442 errors=`expr $errors + 1` ;;
443 esac
445 test -s basic-j.E || rm -f basic-j.E
446 cat $srcdir/basic-j.I | $xx > basic-j.O 2> basic-j.E
447 code=$?
448 if test $code != 0 ; then
449 $echo "Test basic-j(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
450 errors=`expr $errors + 1`
451 else
452 cmp basic-j.O $srcdir/basic-j.X > /dev/null 2>&1
453 case $? in
454 0) if test "$VERBOSE" ; then $echo "passed basic-j(|)"; fi ;;
455 1) $echo "Test basic-j(|) failed: files basic-j.O and $srcdir/basic-j.X differ" 1>&2;
456 errors=`expr $errors + 1` ;;
457 2) $echo "Test basic-j(|) may have failed." 1>&2;
458 $echo The command "cmp basic-j.O $srcdir/basic-j.X" failed. 1>&2 ;
459 errors=`expr $errors + 1` ;;
460 esac
462 test -s basic-j.E || rm -f basic-j.E
463 $xx < $srcdir/basic-j.I > basic-j.O 2> basic-j.E
464 code=$?
465 if test $code != 0 ; then
466 $echo "Test basic-j(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
467 errors=`expr $errors + 1`
468 else
469 cmp basic-j.O $srcdir/basic-j.X > /dev/null 2>&1
470 case $? in
471 0) if test "$VERBOSE" ; then $echo "passed basic-j(<)"; fi ;;
472 1) $echo "Test basic-j(<) failed: files basic-j.O and $srcdir/basic-j.X differ" 1>&2;
473 errors=`expr $errors + 1` ;;
474 2) $echo "Test basic-j(<) may have failed." 1>&2;
475 $echo The command "cmp basic-j.O $srcdir/basic-j.X" failed. 1>&2 ;
476 errors=`expr $errors + 1` ;;
477 esac
479 test -s basic-j.E || rm -f basic-j.E
480 $xx $srcdir/basic-k.I > basic-k.O 2> basic-k.E
481 code=$?
482 if test $code != 0 ; then
483 $echo "Test basic-k(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
484 errors=`expr $errors + 1`
485 else
486 cmp basic-k.O $srcdir/basic-k.X > /dev/null 2>&1
487 case $? in
488 0) if test "$VERBOSE" ; then $echo "passed basic-k(F)"; fi ;;
489 1) $echo "Test basic-k(F) failed: files basic-k.O and $srcdir/basic-k.X differ" 1>&2;
490 errors=`expr $errors + 1` ;;
491 2) $echo "Test basic-k(F) may have failed." 1>&2;
492 $echo The command "cmp basic-k.O $srcdir/basic-k.X" failed. 1>&2 ;
493 errors=`expr $errors + 1` ;;
494 esac
496 test -s basic-k.E || rm -f basic-k.E
497 cat $srcdir/basic-k.I | $xx > basic-k.O 2> basic-k.E
498 code=$?
499 if test $code != 0 ; then
500 $echo "Test basic-k(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
501 errors=`expr $errors + 1`
502 else
503 cmp basic-k.O $srcdir/basic-k.X > /dev/null 2>&1
504 case $? in
505 0) if test "$VERBOSE" ; then $echo "passed basic-k(|)"; fi ;;
506 1) $echo "Test basic-k(|) failed: files basic-k.O and $srcdir/basic-k.X differ" 1>&2;
507 errors=`expr $errors + 1` ;;
508 2) $echo "Test basic-k(|) may have failed." 1>&2;
509 $echo The command "cmp basic-k.O $srcdir/basic-k.X" failed. 1>&2 ;
510 errors=`expr $errors + 1` ;;
511 esac
513 test -s basic-k.E || rm -f basic-k.E
514 $xx < $srcdir/basic-k.I > basic-k.O 2> basic-k.E
515 code=$?
516 if test $code != 0 ; then
517 $echo "Test basic-k(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
518 errors=`expr $errors + 1`
519 else
520 cmp basic-k.O $srcdir/basic-k.X > /dev/null 2>&1
521 case $? in
522 0) if test "$VERBOSE" ; then $echo "passed basic-k(<)"; fi ;;
523 1) $echo "Test basic-k(<) failed: files basic-k.O and $srcdir/basic-k.X differ" 1>&2;
524 errors=`expr $errors + 1` ;;
525 2) $echo "Test basic-k(<) may have failed." 1>&2;
526 $echo The command "cmp basic-k.O $srcdir/basic-k.X" failed. 1>&2 ;
527 errors=`expr $errors + 1` ;;
528 esac
530 test -s basic-k.E || rm -f basic-k.E
531 $xx -b $srcdir/opt-b.I > opt-b.O 2> opt-b.E
532 code=$?
533 if test $code != 0 ; then
534 $echo "Test opt-b(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
535 errors=`expr $errors + 1`
536 else
537 cmp opt-b.O $srcdir/opt-b.X > /dev/null 2>&1
538 case $? in
539 0) if test "$VERBOSE" ; then $echo "passed opt-b(F)"; fi ;;
540 1) $echo "Test opt-b(F) failed: files opt-b.O and $srcdir/opt-b.X differ" 1>&2;
541 errors=`expr $errors + 1` ;;
542 2) $echo "Test opt-b(F) may have failed." 1>&2;
543 $echo The command "cmp opt-b.O $srcdir/opt-b.X" failed. 1>&2 ;
544 errors=`expr $errors + 1` ;;
545 esac
547 test -s opt-b.E || rm -f opt-b.E
548 cat $srcdir/opt-b.I | $xx -b > opt-b.O 2> opt-b.E
549 code=$?
550 if test $code != 0 ; then
551 $echo "Test opt-b(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
552 errors=`expr $errors + 1`
553 else
554 cmp opt-b.O $srcdir/opt-b.X > /dev/null 2>&1
555 case $? in
556 0) if test "$VERBOSE" ; then $echo "passed opt-b(|)"; fi ;;
557 1) $echo "Test opt-b(|) failed: files opt-b.O and $srcdir/opt-b.X differ" 1>&2;
558 errors=`expr $errors + 1` ;;
559 2) $echo "Test opt-b(|) may have failed." 1>&2;
560 $echo The command "cmp opt-b.O $srcdir/opt-b.X" failed. 1>&2 ;
561 errors=`expr $errors + 1` ;;
562 esac
564 test -s opt-b.E || rm -f opt-b.E
565 $xx -b < $srcdir/opt-b.I > opt-b.O 2> opt-b.E
566 code=$?
567 if test $code != 0 ; then
568 $echo "Test opt-b(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
569 errors=`expr $errors + 1`
570 else
571 cmp opt-b.O $srcdir/opt-b.X > /dev/null 2>&1
572 case $? in
573 0) if test "$VERBOSE" ; then $echo "passed opt-b(<)"; fi ;;
574 1) $echo "Test opt-b(<) failed: files opt-b.O and $srcdir/opt-b.X differ" 1>&2;
575 errors=`expr $errors + 1` ;;
576 2) $echo "Test opt-b(<) may have failed." 1>&2;
577 $echo The command "cmp opt-b.O $srcdir/opt-b.X" failed. 1>&2 ;
578 errors=`expr $errors + 1` ;;
579 esac
581 test -s opt-b.E || rm -f opt-b.E
582 $xx -s: $srcdir/opt-s.I > opt-s.O 2> opt-s.E
583 code=$?
584 if test $code != 0 ; then
585 $echo "Test opt-s(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
586 errors=`expr $errors + 1`
587 else
588 cmp opt-s.O $srcdir/opt-s.X > /dev/null 2>&1
589 case $? in
590 0) if test "$VERBOSE" ; then $echo "passed opt-s(F)"; fi ;;
591 1) $echo "Test opt-s(F) failed: files opt-s.O and $srcdir/opt-s.X differ" 1>&2;
592 errors=`expr $errors + 1` ;;
593 2) $echo "Test opt-s(F) may have failed." 1>&2;
594 $echo The command "cmp opt-s.O $srcdir/opt-s.X" failed. 1>&2 ;
595 errors=`expr $errors + 1` ;;
596 esac
598 test -s opt-s.E || rm -f opt-s.E
599 cat $srcdir/opt-s.I | $xx -s: > opt-s.O 2> opt-s.E
600 code=$?
601 if test $code != 0 ; then
602 $echo "Test opt-s(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
603 errors=`expr $errors + 1`
604 else
605 cmp opt-s.O $srcdir/opt-s.X > /dev/null 2>&1
606 case $? in
607 0) if test "$VERBOSE" ; then $echo "passed opt-s(|)"; fi ;;
608 1) $echo "Test opt-s(|) failed: files opt-s.O and $srcdir/opt-s.X differ" 1>&2;
609 errors=`expr $errors + 1` ;;
610 2) $echo "Test opt-s(|) may have failed." 1>&2;
611 $echo The command "cmp opt-s.O $srcdir/opt-s.X" failed. 1>&2 ;
612 errors=`expr $errors + 1` ;;
613 esac
615 test -s opt-s.E || rm -f opt-s.E
616 $xx -s: < $srcdir/opt-s.I > opt-s.O 2> opt-s.E
617 code=$?
618 if test $code != 0 ; then
619 $echo "Test opt-s(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
620 errors=`expr $errors + 1`
621 else
622 cmp opt-s.O $srcdir/opt-s.X > /dev/null 2>&1
623 case $? in
624 0) if test "$VERBOSE" ; then $echo "passed opt-s(<)"; fi ;;
625 1) $echo "Test opt-s(<) failed: files opt-s.O and $srcdir/opt-s.X differ" 1>&2;
626 errors=`expr $errors + 1` ;;
627 2) $echo "Test opt-s(<) may have failed." 1>&2;
628 $echo The command "cmp opt-s.O $srcdir/opt-s.X" failed. 1>&2 ;
629 errors=`expr $errors + 1` ;;
630 esac
632 test -s opt-s.E || rm -f opt-s.E
633 $xx -s : -b $srcdir/opt-sb.I > opt-sb.O 2> opt-sb.E
634 code=$?
635 if test $code != 0 ; then
636 $echo "Test opt-sb(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
637 errors=`expr $errors + 1`
638 else
639 cmp opt-sb.O $srcdir/opt-sb.X > /dev/null 2>&1
640 case $? in
641 0) if test "$VERBOSE" ; then $echo "passed opt-sb(F)"; fi ;;
642 1) $echo "Test opt-sb(F) failed: files opt-sb.O and $srcdir/opt-sb.X differ" 1>&2;
643 errors=`expr $errors + 1` ;;
644 2) $echo "Test opt-sb(F) may have failed." 1>&2;
645 $echo The command "cmp opt-sb.O $srcdir/opt-sb.X" failed. 1>&2 ;
646 errors=`expr $errors + 1` ;;
647 esac
649 test -s opt-sb.E || rm -f opt-sb.E
650 cat $srcdir/opt-sb.I | $xx -s : -b > opt-sb.O 2> opt-sb.E
651 code=$?
652 if test $code != 0 ; then
653 $echo "Test opt-sb(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
654 errors=`expr $errors + 1`
655 else
656 cmp opt-sb.O $srcdir/opt-sb.X > /dev/null 2>&1
657 case $? in
658 0) if test "$VERBOSE" ; then $echo "passed opt-sb(|)"; fi ;;
659 1) $echo "Test opt-sb(|) failed: files opt-sb.O and $srcdir/opt-sb.X differ" 1>&2;
660 errors=`expr $errors + 1` ;;
661 2) $echo "Test opt-sb(|) may have failed." 1>&2;
662 $echo The command "cmp opt-sb.O $srcdir/opt-sb.X" failed. 1>&2 ;
663 errors=`expr $errors + 1` ;;
664 esac
666 test -s opt-sb.E || rm -f opt-sb.E
667 $xx -s : -b < $srcdir/opt-sb.I > opt-sb.O 2> opt-sb.E
668 code=$?
669 if test $code != 0 ; then
670 $echo "Test opt-sb(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
671 errors=`expr $errors + 1`
672 else
673 cmp opt-sb.O $srcdir/opt-sb.X > /dev/null 2>&1
674 case $? in
675 0) if test "$VERBOSE" ; then $echo "passed opt-sb(<)"; fi ;;
676 1) $echo "Test opt-sb(<) failed: files opt-sb.O and $srcdir/opt-sb.X differ" 1>&2;
677 errors=`expr $errors + 1` ;;
678 2) $echo "Test opt-sb(<) may have failed." 1>&2;
679 $echo The command "cmp opt-sb.O $srcdir/opt-sb.X" failed. 1>&2 ;
680 errors=`expr $errors + 1` ;;
681 esac
683 test -s opt-sb.E || rm -f opt-sb.E
684 $xx -r -s '\._+' $srcdir/opt-r.I > opt-r.O 2> opt-r.E
685 code=$?
686 if test $code != 0 ; then
687 $echo "Test opt-r(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
688 errors=`expr $errors + 1`
689 else
690 cmp opt-r.O $srcdir/opt-r.X > /dev/null 2>&1
691 case $? in
692 0) if test "$VERBOSE" ; then $echo "passed opt-r(F)"; fi ;;
693 1) $echo "Test opt-r(F) failed: files opt-r.O and $srcdir/opt-r.X differ" 1>&2;
694 errors=`expr $errors + 1` ;;
695 2) $echo "Test opt-r(F) may have failed." 1>&2;
696 $echo The command "cmp opt-r.O $srcdir/opt-r.X" failed. 1>&2 ;
697 errors=`expr $errors + 1` ;;
698 esac
700 test -s opt-r.E || rm -f opt-r.E
701 cat $srcdir/opt-r.I | $xx -r -s '\._+' > opt-r.O 2> opt-r.E
702 code=$?
703 if test $code != 0 ; then
704 $echo "Test opt-r(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
705 errors=`expr $errors + 1`
706 else
707 cmp opt-r.O $srcdir/opt-r.X > /dev/null 2>&1
708 case $? in
709 0) if test "$VERBOSE" ; then $echo "passed opt-r(|)"; fi ;;
710 1) $echo "Test opt-r(|) failed: files opt-r.O and $srcdir/opt-r.X differ" 1>&2;
711 errors=`expr $errors + 1` ;;
712 2) $echo "Test opt-r(|) may have failed." 1>&2;
713 $echo The command "cmp opt-r.O $srcdir/opt-r.X" failed. 1>&2 ;
714 errors=`expr $errors + 1` ;;
715 esac
717 test -s opt-r.E || rm -f opt-r.E
718 $xx -r -s '\._+' < $srcdir/opt-r.I > opt-r.O 2> opt-r.E
719 code=$?
720 if test $code != 0 ; then
721 $echo "Test opt-r(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
722 errors=`expr $errors + 1`
723 else
724 cmp opt-r.O $srcdir/opt-r.X > /dev/null 2>&1
725 case $? in
726 0) if test "$VERBOSE" ; then $echo "passed opt-r(<)"; fi ;;
727 1) $echo "Test opt-r(<) failed: files opt-r.O and $srcdir/opt-r.X differ" 1>&2;
728 errors=`expr $errors + 1` ;;
729 2) $echo "Test opt-r(<) may have failed." 1>&2;
730 $echo The command "cmp opt-r.O $srcdir/opt-r.X" failed. 1>&2 ;
731 errors=`expr $errors + 1` ;;
732 esac
734 test -s opt-r.E || rm -f opt-r.E
735 $xx -r -s '\._+' $srcdir/opt-r2.I > opt-r2.O 2> opt-r2.E
736 code=$?
737 if test $code != 0 ; then
738 $echo "Test opt-r2(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
739 errors=`expr $errors + 1`
740 else
741 cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
742 case $? in
743 0) if test "$VERBOSE" ; then $echo "passed opt-r2(F)"; fi ;;
744 1) $echo "Test opt-r2(F) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
745 errors=`expr $errors + 1` ;;
746 2) $echo "Test opt-r2(F) may have failed." 1>&2;
747 $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
748 errors=`expr $errors + 1` ;;
749 esac
751 test -s opt-r2.E || rm -f opt-r2.E
752 cat $srcdir/opt-r2.I | $xx -r -s '\._+' > opt-r2.O 2> opt-r2.E
753 code=$?
754 if test $code != 0 ; then
755 $echo "Test opt-r2(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
756 errors=`expr $errors + 1`
757 else
758 cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
759 case $? in
760 0) if test "$VERBOSE" ; then $echo "passed opt-r2(|)"; fi ;;
761 1) $echo "Test opt-r2(|) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
762 errors=`expr $errors + 1` ;;
763 2) $echo "Test opt-r2(|) may have failed." 1>&2;
764 $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
765 errors=`expr $errors + 1` ;;
766 esac
768 test -s opt-r2.E || rm -f opt-r2.E
769 $xx -r -s '\._+' < $srcdir/opt-r2.I > opt-r2.O 2> opt-r2.E
770 code=$?
771 if test $code != 0 ; then
772 $echo "Test opt-r2(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
773 errors=`expr $errors + 1`
774 else
775 cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
776 case $? in
777 0) if test "$VERBOSE" ; then $echo "passed opt-r2(<)"; fi ;;
778 1) $echo "Test opt-r2(<) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
779 errors=`expr $errors + 1` ;;
780 2) $echo "Test opt-r2(<) may have failed." 1>&2;
781 $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
782 errors=`expr $errors + 1` ;;
783 esac
785 test -s opt-r2.E || rm -f opt-r2.E
786 $xx -b -r -s '\._+' $srcdir/opt-br.I > opt-br.O 2> opt-br.E
787 code=$?
788 if test $code != 0 ; then
789 $echo "Test opt-br(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
790 errors=`expr $errors + 1`
791 else
792 cmp opt-br.O $srcdir/opt-br.X > /dev/null 2>&1
793 case $? in
794 0) if test "$VERBOSE" ; then $echo "passed opt-br(F)"; fi ;;
795 1) $echo "Test opt-br(F) failed: files opt-br.O and $srcdir/opt-br.X differ" 1>&2;
796 errors=`expr $errors + 1` ;;
797 2) $echo "Test opt-br(F) may have failed." 1>&2;
798 $echo The command "cmp opt-br.O $srcdir/opt-br.X" failed. 1>&2 ;
799 errors=`expr $errors + 1` ;;
800 esac
802 test -s opt-br.E || rm -f opt-br.E
803 cat $srcdir/opt-br.I | $xx -b -r -s '\._+' > opt-br.O 2> opt-br.E
804 code=$?
805 if test $code != 0 ; then
806 $echo "Test opt-br(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
807 errors=`expr $errors + 1`
808 else
809 cmp opt-br.O $srcdir/opt-br.X > /dev/null 2>&1
810 case $? in
811 0) if test "$VERBOSE" ; then $echo "passed opt-br(|)"; fi ;;
812 1) $echo "Test opt-br(|) failed: files opt-br.O and $srcdir/opt-br.X differ" 1>&2;
813 errors=`expr $errors + 1` ;;
814 2) $echo "Test opt-br(|) may have failed." 1>&2;
815 $echo The command "cmp opt-br.O $srcdir/opt-br.X" failed. 1>&2 ;
816 errors=`expr $errors + 1` ;;
817 esac
819 test -s opt-br.E || rm -f opt-br.E
820 $xx -b -r -s '\._+' < $srcdir/opt-br.I > opt-br.O 2> opt-br.E
821 code=$?
822 if test $code != 0 ; then
823 $echo "Test opt-br(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
824 errors=`expr $errors + 1`
825 else
826 cmp opt-br.O $srcdir/opt-br.X > /dev/null 2>&1
827 case $? in
828 0) if test "$VERBOSE" ; then $echo "passed opt-br(<)"; fi ;;
829 1) $echo "Test opt-br(<) failed: files opt-br.O and $srcdir/opt-br.X differ" 1>&2;
830 errors=`expr $errors + 1` ;;
831 2) $echo "Test opt-br(<) may have failed." 1>&2;
832 $echo The command "cmp opt-br.O $srcdir/opt-br.X" failed. 1>&2 ;
833 errors=`expr $errors + 1` ;;
834 esac
836 test -s opt-br.E || rm -f opt-br.E
837 $xx -b -r -s '\._+' $srcdir/opt-br2.I > opt-br2.O 2> opt-br2.E
838 code=$?
839 if test $code != 0 ; then
840 $echo "Test opt-br2(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
841 errors=`expr $errors + 1`
842 else
843 cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
844 case $? in
845 0) if test "$VERBOSE" ; then $echo "passed opt-br2(F)"; fi ;;
846 1) $echo "Test opt-br2(F) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
847 errors=`expr $errors + 1` ;;
848 2) $echo "Test opt-br2(F) may have failed." 1>&2;
849 $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
850 errors=`expr $errors + 1` ;;
851 esac
853 test -s opt-br2.E || rm -f opt-br2.E
854 cat $srcdir/opt-br2.I | $xx -b -r -s '\._+' > opt-br2.O 2> opt-br2.E
855 code=$?
856 if test $code != 0 ; then
857 $echo "Test opt-br2(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
858 errors=`expr $errors + 1`
859 else
860 cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
861 case $? in
862 0) if test "$VERBOSE" ; then $echo "passed opt-br2(|)"; fi ;;
863 1) $echo "Test opt-br2(|) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
864 errors=`expr $errors + 1` ;;
865 2) $echo "Test opt-br2(|) may have failed." 1>&2;
866 $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
867 errors=`expr $errors + 1` ;;
868 esac
870 test -s opt-br2.E || rm -f opt-br2.E
871 $xx -b -r -s '\._+' < $srcdir/opt-br2.I > opt-br2.O 2> opt-br2.E
872 code=$?
873 if test $code != 0 ; then
874 $echo "Test opt-br2(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
875 errors=`expr $errors + 1`
876 else
877 cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
878 case $? in
879 0) if test "$VERBOSE" ; then $echo "passed opt-br2(<)"; fi ;;
880 1) $echo "Test opt-br2(<) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
881 errors=`expr $errors + 1` ;;
882 2) $echo "Test opt-br2(<) may have failed." 1>&2;
883 $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
884 errors=`expr $errors + 1` ;;
885 esac
887 test -s opt-br2.E || rm -f opt-br2.E
888 if test $errors = 0 ; then
889 $echo Passed all 51 tests. 1>&2
890 else
891 $echo Failed $errors tests. 1>&2
893 test $errors = 0 || errors=1
894 exit $errors