summaryrefslogtreecommitdiff
path: root/tests/join/join-tests
blob: bc26283baf37316f71629cabbd08bf4e444eb53d (plain)
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
#! /bin/sh
# This script was generated automatically by build-script.
case $# in
  0) xx='../../src/join';;
  *) xx="$1";;
esac
test "$VERBOSE" && echo=echo || echo=:
$echo testing program: $xx
errors=0
test "$srcdir" || srcdir=.
test "$VERBOSE" && $xx --version 2> /dev/null

# Make sure we get English translations.
LANGUAGE=C
export LANGUAGE
LC_ALL=C
export LC_ALL
LANG=C
export LANG

$xx -a1 $srcdir/1a.I1 $srcdir/1a.I2 > 1a.O 2> 1a.E
code=$?
if test $code != 0; then
  $echo "Test 1a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1a.O $srcdir/1a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1a"; fi;;
    1) $echo "Test 1a failed: files 1a.O and $srcdir/1a.X differ" 1>&2
       (diff -c 1a.O $srcdir/1a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1a may have failed." 1>&2
       $echo The command "cmp 1a.O $srcdir/1a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1a.E || rm -f 1a.E
$xx -a2 $srcdir/1b.I1 $srcdir/1b.I2 > 1b.O 2> 1b.E
code=$?
if test $code != 0; then
  $echo "Test 1b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1b.O $srcdir/1b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1b"; fi;;
    1) $echo "Test 1b failed: files 1b.O and $srcdir/1b.X differ" 1>&2
       (diff -c 1b.O $srcdir/1b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1b may have failed." 1>&2
       $echo The command "cmp 1b.O $srcdir/1b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1b.E || rm -f 1b.E
$xx -a1 -a2 $srcdir/1c.I1 $srcdir/1c.I2 > 1c.O 2> 1c.E
code=$?
if test $code != 0; then
  $echo "Test 1c failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1c.O $srcdir/1c.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1c"; fi;;
    1) $echo "Test 1c failed: files 1c.O and $srcdir/1c.X differ" 1>&2
       (diff -c 1c.O $srcdir/1c.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1c may have failed." 1>&2
       $echo The command "cmp 1c.O $srcdir/1c.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1c.E || rm -f 1c.E
$xx -a1 $srcdir/1d.I1 $srcdir/1d.I2 > 1d.O 2> 1d.E
code=$?
if test $code != 0; then
  $echo "Test 1d failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1d.O $srcdir/1d.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1d"; fi;;
    1) $echo "Test 1d failed: files 1d.O and $srcdir/1d.X differ" 1>&2
       (diff -c 1d.O $srcdir/1d.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1d may have failed." 1>&2
       $echo The command "cmp 1d.O $srcdir/1d.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1d.E || rm -f 1d.E
$xx -a2 $srcdir/1e.I1 $srcdir/1e.I2 > 1e.O 2> 1e.E
code=$?
if test $code != 0; then
  $echo "Test 1e failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1e.O $srcdir/1e.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1e"; fi;;
    1) $echo "Test 1e failed: files 1e.O and $srcdir/1e.X differ" 1>&2
       (diff -c 1e.O $srcdir/1e.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1e may have failed." 1>&2
       $echo The command "cmp 1e.O $srcdir/1e.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1e.E || rm -f 1e.E
$xx -a2 $srcdir/1f.I1 $srcdir/1f.I2 > 1f.O 2> 1f.E
code=$?
if test $code != 0; then
  $echo "Test 1f failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 1f.O $srcdir/1f.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 1f"; fi;;
    1) $echo "Test 1f failed: files 1f.O and $srcdir/1f.X differ" 1>&2
       (diff -c 1f.O $srcdir/1f.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 1f may have failed." 1>&2
       $echo The command "cmp 1f.O $srcdir/1f.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 1f.E || rm -f 1f.E
$xx -a1 -e . $srcdir/2a.I1 $srcdir/2a.I2 > 2a.O 2> 2a.E
code=$?
if test $code != 0; then
  $echo "Test 2a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 2a.O $srcdir/2a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 2a"; fi;;
    1) $echo "Test 2a failed: files 2a.O and $srcdir/2a.X differ" 1>&2
       (diff -c 2a.O $srcdir/2a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 2a may have failed." 1>&2
       $echo The command "cmp 2a.O $srcdir/2a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 2a.E || rm -f 2a.E
$xx -a1 -e . -o 2.1,2.2,2.3 $srcdir/2b.I1 $srcdir/2b.I2 > 2b.O 2> 2b.E
code=$?
if test $code != 0; then
  $echo "Test 2b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 2b.O $srcdir/2b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 2b"; fi;;
    1) $echo "Test 2b failed: files 2b.O and $srcdir/2b.X differ" 1>&2
       (diff -c 2b.O $srcdir/2b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 2b may have failed." 1>&2
       $echo The command "cmp 2b.O $srcdir/2b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 2b.E || rm -f 2b.E
$xx -a1 -e . -o 2.1,2.2,2.3 $srcdir/2c.I1 $srcdir/2c.I2 > 2c.O 2> 2c.E
code=$?
if test $code != 0; then
  $echo "Test 2c failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 2c.O $srcdir/2c.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 2c"; fi;;
    1) $echo "Test 2c failed: files 2c.O and $srcdir/2c.X differ" 1>&2
       (diff -c 2c.O $srcdir/2c.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 2c may have failed." 1>&2
       $echo The command "cmp 2c.O $srcdir/2c.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 2c.E || rm -f 2c.E
$xx -t: $srcdir/3a.I1 $srcdir/3a.I2 > 3a.O 2> 3a.E
code=$?
if test $code != 0; then
  $echo "Test 3a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 3a.O $srcdir/3a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 3a"; fi;;
    1) $echo "Test 3a failed: files 3a.O and $srcdir/3a.X differ" 1>&2
       (diff -c 3a.O $srcdir/3a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 3a may have failed." 1>&2
       $echo The command "cmp 3a.O $srcdir/3a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 3a.E || rm -f 3a.E
$xx -v 1 $srcdir/4a.I1 $srcdir/4a.I2 > 4a.O 2> 4a.E
code=$?
if test $code != 0; then
  $echo "Test 4a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 4a.O $srcdir/4a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 4a"; fi;;
    1) $echo "Test 4a failed: files 4a.O and $srcdir/4a.X differ" 1>&2
       (diff -c 4a.O $srcdir/4a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 4a may have failed." 1>&2
       $echo The command "cmp 4a.O $srcdir/4a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 4a.E || rm -f 4a.E
$xx -v 2 $srcdir/4b.I1 $srcdir/4b.I2 > 4b.O 2> 4b.E
code=$?
if test $code != 0; then
  $echo "Test 4b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 4b.O $srcdir/4b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 4b"; fi;;
    1) $echo "Test 4b failed: files 4b.O and $srcdir/4b.X differ" 1>&2
       (diff -c 4b.O $srcdir/4b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 4b may have failed." 1>&2
       $echo The command "cmp 4b.O $srcdir/4b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 4b.E || rm -f 4b.E
$xx -v 1 $srcdir/4c.I1 $srcdir/4c.I2 > 4c.O 2> 4c.E
code=$?
if test $code != 0; then
  $echo "Test 4c failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 4c.O $srcdir/4c.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 4c"; fi;;
    1) $echo "Test 4c failed: files 4c.O and $srcdir/4c.X differ" 1>&2
       (diff -c 4c.O $srcdir/4c.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 4c may have failed." 1>&2
       $echo The command "cmp 4c.O $srcdir/4c.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 4c.E || rm -f 4c.E
$xx -v 2 $srcdir/4d.I1 $srcdir/4d.I2 > 4d.O 2> 4d.E
code=$?
if test $code != 0; then
  $echo "Test 4d failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 4d.O $srcdir/4d.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 4d"; fi;;
    1) $echo "Test 4d failed: files 4d.O and $srcdir/4d.X differ" 1>&2
       (diff -c 4d.O $srcdir/4d.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 4d may have failed." 1>&2
       $echo The command "cmp 4d.O $srcdir/4d.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 4d.E || rm -f 4d.E
$xx -v 2 $srcdir/4e.I1 $srcdir/4e.I2 > 4e.O 2> 4e.E
code=$?
if test $code != 0; then
  $echo "Test 4e failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 4e.O $srcdir/4e.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 4e"; fi;;
    1) $echo "Test 4e failed: files 4e.O and $srcdir/4e.X differ" 1>&2
       (diff -c 4e.O $srcdir/4e.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 4e may have failed." 1>&2
       $echo The command "cmp 4e.O $srcdir/4e.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 4e.E || rm -f 4e.E
$xx -a1 -e - -o 1.1 2.2 $srcdir/5a.I1 $srcdir/5a.I2 > 5a.O 2> 5a.E
code=$?
if test $code != 0; then
  $echo "Test 5a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5a.O $srcdir/5a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5a"; fi;;
    1) $echo "Test 5a failed: files 5a.O and $srcdir/5a.X differ" 1>&2
       (diff -c 5a.O $srcdir/5a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5a may have failed." 1>&2
       $echo The command "cmp 5a.O $srcdir/5a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5a.E || rm -f 5a.E
$xx -a1 -e - -o 1.1 2.2 $srcdir/5b.I1 $srcdir/5b.I2 > 5b.O 2> 5b.E
code=$?
if test $code != 0; then
  $echo "Test 5b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5b.O $srcdir/5b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5b"; fi;;
    1) $echo "Test 5b failed: files 5b.O and $srcdir/5b.X differ" 1>&2
       (diff -c 5b.O $srcdir/5b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5b may have failed." 1>&2
       $echo The command "cmp 5b.O $srcdir/5b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5b.E || rm -f 5b.E
$xx -a1 -e - -o 1.1 2.2 $srcdir/5c.I1 $srcdir/5c.I2 > 5c.O 2> 5c.E
code=$?
if test $code != 0; then
  $echo "Test 5c failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5c.O $srcdir/5c.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5c"; fi;;
    1) $echo "Test 5c failed: files 5c.O and $srcdir/5c.X differ" 1>&2
       (diff -c 5c.O $srcdir/5c.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5c may have failed." 1>&2
       $echo The command "cmp 5c.O $srcdir/5c.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5c.E || rm -f 5c.E
$xx -a1 -e - -o 1.1 2.2 $srcdir/5d.I1 $srcdir/5d.I2 > 5d.O 2> 5d.E
code=$?
if test $code != 0; then
  $echo "Test 5d failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5d.O $srcdir/5d.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5d"; fi;;
    1) $echo "Test 5d failed: files 5d.O and $srcdir/5d.X differ" 1>&2
       (diff -c 5d.O $srcdir/5d.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5d may have failed." 1>&2
       $echo The command "cmp 5d.O $srcdir/5d.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5d.E || rm -f 5d.E
$xx -a2 -e - -o 1.1 2.2 $srcdir/5e.I1 $srcdir/5e.I2 > 5e.O 2> 5e.E
code=$?
if test $code != 0; then
  $echo "Test 5e failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5e.O $srcdir/5e.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5e"; fi;;
    1) $echo "Test 5e failed: files 5e.O and $srcdir/5e.X differ" 1>&2
       (diff -c 5e.O $srcdir/5e.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5e may have failed." 1>&2
       $echo The command "cmp 5e.O $srcdir/5e.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5e.E || rm -f 5e.E
$xx -a2 -e - -o 2.2 1.1 $srcdir/5f.I1 $srcdir/5f.I2 > 5f.O 2> 5f.E
code=$?
if test $code != 0; then
  $echo "Test 5f failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5f.O $srcdir/5f.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5f"; fi;;
    1) $echo "Test 5f failed: files 5f.O and $srcdir/5f.X differ" 1>&2
       (diff -c 5f.O $srcdir/5f.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5f may have failed." 1>&2
       $echo The command "cmp 5f.O $srcdir/5f.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5f.E || rm -f 5f.E
$xx -a1 -e - -o 2.2 1.1 $srcdir/5g.I1 $srcdir/5g.I2 > 5g.O 2> 5g.E
code=$?
if test $code != 0; then
  $echo "Test 5g failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5g.O $srcdir/5g.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5g"; fi;;
    1) $echo "Test 5g failed: files 5g.O and $srcdir/5g.X differ" 1>&2
       (diff -c 5g.O $srcdir/5g.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5g may have failed." 1>&2
       $echo The command "cmp 5g.O $srcdir/5g.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5g.E || rm -f 5g.E
$xx -a1 -e - -o 2.2 1.1 $srcdir/5h.I1 $srcdir/5h.I2 > 5h.O 2> 5h.E
code=$?
if test $code != 0; then
  $echo "Test 5h failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5h.O $srcdir/5h.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5h"; fi;;
    1) $echo "Test 5h failed: files 5h.O and $srcdir/5h.X differ" 1>&2
       (diff -c 5h.O $srcdir/5h.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5h may have failed." 1>&2
       $echo The command "cmp 5h.O $srcdir/5h.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5h.E || rm -f 5h.E
$xx -a1 -e - -o 1.1 2.2 $srcdir/5i.I1 $srcdir/5i.I2 > 5i.O 2> 5i.E
code=$?
if test $code != 0; then
  $echo "Test 5i failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5i.O $srcdir/5i.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5i"; fi;;
    1) $echo "Test 5i failed: files 5i.O and $srcdir/5i.X differ" 1>&2
       (diff -c 5i.O $srcdir/5i.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5i may have failed." 1>&2
       $echo The command "cmp 5i.O $srcdir/5i.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5i.E || rm -f 5i.E
$xx -a2 -e - -o 2.2 1.1 $srcdir/5j.I1 $srcdir/5j.I2 > 5j.O 2> 5j.E
code=$?
if test $code != 0; then
  $echo "Test 5j failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5j.O $srcdir/5j.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5j"; fi;;
    1) $echo "Test 5j failed: files 5j.O and $srcdir/5j.X differ" 1>&2
       (diff -c 5j.O $srcdir/5j.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5j may have failed." 1>&2
       $echo The command "cmp 5j.O $srcdir/5j.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5j.E || rm -f 5j.E
$xx -a2 -e - -o 2.2 1.1 $srcdir/5k.I1 $srcdir/5k.I2 > 5k.O 2> 5k.E
code=$?
if test $code != 0; then
  $echo "Test 5k failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5k.O $srcdir/5k.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5k"; fi;;
    1) $echo "Test 5k failed: files 5k.O and $srcdir/5k.X differ" 1>&2
       (diff -c 5k.O $srcdir/5k.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5k may have failed." 1>&2
       $echo The command "cmp 5k.O $srcdir/5k.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5k.E || rm -f 5k.E
$xx -a1 -e - -o 2.2 1.1 $srcdir/5l.I1 $srcdir/5l.I2 > 5l.O 2> 5l.E
code=$?
if test $code != 0; then
  $echo "Test 5l failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5l.O $srcdir/5l.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5l"; fi;;
    1) $echo "Test 5l failed: files 5l.O and $srcdir/5l.X differ" 1>&2
       (diff -c 5l.O $srcdir/5l.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5l may have failed." 1>&2
       $echo The command "cmp 5l.O $srcdir/5l.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5l.E || rm -f 5l.E
$xx -a2 -e - -o 2.2 1.1 $srcdir/5m.I1 $srcdir/5m.I2 > 5m.O 2> 5m.E
code=$?
if test $code != 0; then
  $echo "Test 5m failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 5m.O $srcdir/5m.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 5m"; fi;;
    1) $echo "Test 5m failed: files 5m.O and $srcdir/5m.X differ" 1>&2
       (diff -c 5m.O $srcdir/5m.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 5m may have failed." 1>&2
       $echo The command "cmp 5m.O $srcdir/5m.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 5m.E || rm -f 5m.E
$xx -e - $srcdir/6a.I1 $srcdir/6a.I2 > 6a.O 2> 6a.E
code=$?
if test $code != 0; then
  $echo "Test 6a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 6a.O $srcdir/6a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 6a"; fi;;
    1) $echo "Test 6a failed: files 6a.O and $srcdir/6a.X differ" 1>&2
       (diff -c 6a.O $srcdir/6a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 6a may have failed." 1>&2
       $echo The command "cmp 6a.O $srcdir/6a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 6a.E || rm -f 6a.E
$xx -a1 -e - $srcdir/6b.I1 $srcdir/6b.I2 > 6b.O 2> 6b.E
code=$?
if test $code != 0; then
  $echo "Test 6b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 6b.O $srcdir/6b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 6b"; fi;;
    1) $echo "Test 6b failed: files 6b.O and $srcdir/6b.X differ" 1>&2
       (diff -c 6b.O $srcdir/6b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 6b may have failed." 1>&2
       $echo The command "cmp 6b.O $srcdir/6b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 6b.E || rm -f 6b.E
$xx -a1 -e - $srcdir/6c.I1 $srcdir/6c.I2 > 6c.O 2> 6c.E
code=$?
if test $code != 0; then
  $echo "Test 6c failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 6c.O $srcdir/6c.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 6c"; fi;;
    1) $echo "Test 6c failed: files 6c.O and $srcdir/6c.X differ" 1>&2
       (diff -c 6c.O $srcdir/6c.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 6c may have failed." 1>&2
       $echo The command "cmp 6c.O $srcdir/6c.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 6c.E || rm -f 6c.E
$xx -a1 -e . -o 2.7 $srcdir/7a.I1 $srcdir/7a.I2 > 7a.O 2> 7a.E
code=$?
if test $code != 0; then
  $echo "Test 7a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 7a.O $srcdir/7a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 7a"; fi;;
    1) $echo "Test 7a failed: files 7a.O and $srcdir/7a.X differ" 1>&2
       (diff -c 7a.O $srcdir/7a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 7a may have failed." 1>&2
       $echo The command "cmp 7a.O $srcdir/7a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 7a.E || rm -f 7a.E
$xx -a1 -e . -o 0,1.2 $srcdir/8a.I1 $srcdir/8a.I2 > 8a.O 2> 8a.E
code=$?
if test $code != 0; then
  $echo "Test 8a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 8a.O $srcdir/8a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 8a"; fi;;
    1) $echo "Test 8a failed: files 8a.O and $srcdir/8a.X differ" 1>&2
       (diff -c 8a.O $srcdir/8a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 8a may have failed." 1>&2
       $echo The command "cmp 8a.O $srcdir/8a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 8a.E || rm -f 8a.E
$xx -a1 -a2 -e . -o 0,1.2 $srcdir/8b.I1 $srcdir/8b.I2 > 8b.O 2> 8b.E
code=$?
if test $code != 0; then
  $echo "Test 8b failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 8b.O $srcdir/8b.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 8b"; fi;;
    1) $echo "Test 8b failed: files 8b.O and $srcdir/8b.X differ" 1>&2
       (diff -c 8b.O $srcdir/8b.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 8b may have failed." 1>&2
       $echo The command "cmp 8b.O $srcdir/8b.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 8b.E || rm -f 8b.E
$xx  $srcdir/9a.I1 $srcdir/9a.I2 > 9a.O 2> 9a.E
code=$?
if test $code != 0; then
  $echo "Test 9a failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp 9a.O $srcdir/9a.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed 9a"; fi;;
    1) $echo "Test 9a failed: files 9a.O and $srcdir/9a.X differ" 1>&2
       (diff -c 9a.O $srcdir/9a.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test 9a may have failed." 1>&2
       $echo The command "cmp 9a.O $srcdir/9a.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s 9a.E || rm -f 9a.E
$xx -t: -1 1 -2 1 $srcdir/trailing-sp.I1 $srcdir/trailing-sp.I2 > trailing-sp.O 2> trailing-sp.E
code=$?
if test $code != 0; then
  $echo "Test trailing-sp failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp trailing-sp.O $srcdir/trailing-sp.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed trailing-sp"; fi;;
    1) $echo "Test trailing-sp failed: files trailing-sp.O and $srcdir/trailing-sp.X differ" 1>&2
       (diff -c trailing-sp.O $srcdir/trailing-sp.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test trailing-sp may have failed." 1>&2
       $echo The command "cmp trailing-sp.O $srcdir/trailing-sp.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s trailing-sp.E || rm -f trailing-sp.E
$xx  $srcdir/sp-vs-blank.I1 $srcdir/sp-vs-blank.I2 > sp-vs-blank.O 2> sp-vs-blank.E
code=$?
if test $code != 0; then
  $echo "Test sp-vs-blank failed: ../../src/join return code $code differs from expected value 0" 1>&2
  errors=`expr $errors + 1`
else
  cmp sp-vs-blank.O $srcdir/sp-vs-blank.X > /dev/null 2>&1
  case $? in
    0) if test "$VERBOSE"; then $echo "passed sp-vs-blank"; fi;;
    1) $echo "Test sp-vs-blank failed: files sp-vs-blank.O and $srcdir/sp-vs-blank.X differ" 1>&2
       (diff -c sp-vs-blank.O $srcdir/sp-vs-blank.X) 2> /dev/null
       errors=`expr $errors + 1`;;
    2) $echo "Test sp-vs-blank may have failed." 1>&2
       $echo The command "cmp sp-vs-blank.O $srcdir/sp-vs-blank.X" failed. 1>&2
       errors=`expr $errors + 1`;;
  esac
fi
test -s sp-vs-blank.E || rm -f sp-vs-blank.E
if test $errors = 0; then
  $echo Passed all 37 tests. 1>&2
else
  $echo Failed $errors tests. 1>&2
fi
test $errors = 0 || errors=1
exit $errors