summaryrefslogtreecommitdiff
path: root/tests/tr/tr-tests
blob: e30e92a7451366a423f2f61b3d7d6213bb20b951 (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
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
#! /bin/sh
# This script was generated automatically by build-script.
case $# in
  0) xx='../../src/tr';;
  *) xx="$1";;
esac
test "$VERBOSE" && echo=echo || echo=:
$echo testing program: $xx
errors=0
test "$srcdir" || srcdir=.
test "$VERBOSE" && $xx --version 2> /dev/null
$xx  'abcd' '[]*]' < $srcdir/t1.in > t1.out 2> t1.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 1 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t1.out $srcdir/t1.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 1; fi ;; # equal files
    1) echo Test 1 failed: files t1.out and $srcdir/t1.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 1 may have failed. 1>&2;
       echo The command "cmp t1.out $srcdir/t1.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'abc' '[%*]xyz' < $srcdir/t2.in > t2.out 2> t2.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 2 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t2.out $srcdir/t2.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 2; fi ;; # equal files
    1) echo Test 2 failed: files t2.out and $srcdir/t2.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 2 may have failed. 1>&2;
       echo The command "cmp t2.out $srcdir/t2.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  '' '[.*]' < $srcdir/t3.in > t3.out 2> t3.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 3 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t3.out $srcdir/t3.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 3; fi ;; # equal files
    1) echo Test 3 failed: files t3.out and $srcdir/t3.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 3 may have failed. 1>&2;
       echo The command "cmp t3.out $srcdir/t3.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -t 'abcd' 'xy' < $srcdir/t4.in > t4.out 2> t4.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 4 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t4.out $srcdir/t4.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 4; fi ;; # equal files
    1) echo Test 4 failed: files t4.out and $srcdir/t4.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 4 may have failed. 1>&2;
       echo The command "cmp t4.out $srcdir/t4.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'abcd' 'xy' < $srcdir/t5.in > t5.out 2> t5.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 5 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t5.out $srcdir/t5.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 5; fi ;; # equal files
    1) echo Test 5 failed: files t5.out and $srcdir/t5.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 5 may have failed. 1>&2;
       echo The command "cmp t5.out $srcdir/t5.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'abcd' 'x[y*]' < $srcdir/t6.in > t6.out 2> t6.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 6 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t6.out $srcdir/t6.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 6; fi ;; # equal files
    1) echo Test 6 failed: files t6.out and $srcdir/t6.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 6 may have failed. 1>&2;
       echo The command "cmp t6.out $srcdir/t6.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s 'a-p' '%[.*]$' < $srcdir/t7.in > t7.out 2> t7.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 7 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t7.out $srcdir/t7.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 7; fi ;; # equal files
    1) echo Test 7 failed: files t7.out and $srcdir/t7.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 7 may have failed. 1>&2;
       echo The command "cmp t7.out $srcdir/t7.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s 'a-p' '[.*]$' < $srcdir/t8.in > t8.out 2> t8.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 8 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t8.out $srcdir/t8.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 8; fi ;; # equal files
    1) echo Test 8 failed: files t8.out and $srcdir/t8.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 8 may have failed. 1>&2;
       echo The command "cmp t8.out $srcdir/t8.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s 'a-p' '%[.*]' < $srcdir/t9.in > t9.out 2> t9.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test 9 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp t9.out $srcdir/t9.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed 9; fi ;; # equal files
    1) echo Test 9 failed: files t9.out and $srcdir/t9.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test 9 may have failed. 1>&2;
       echo The command "cmp t9.out $srcdir/t9.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s '[a-z]' < $srcdir/ta.in > ta.out 2> ta.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test a failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp ta.out $srcdir/ta.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed a; fi ;; # equal files
    1) echo Test a failed: files ta.out and $srcdir/ta.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test a may have failed. 1>&2;
       echo The command "cmp ta.out $srcdir/ta.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s '[a-c]' < $srcdir/tb.in > tb.out 2> tb.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test b failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tb.out $srcdir/tb.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed b; fi ;; # equal files
    1) echo Test b failed: files tb.out and $srcdir/tb.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test b may have failed. 1>&2;
       echo The command "cmp tb.out $srcdir/tb.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s '[a-b]' < $srcdir/tc.in > tc.out 2> tc.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test c failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tc.out $srcdir/tc.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed c; fi ;; # equal files
    1) echo Test c failed: files tc.out and $srcdir/tc.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test c may have failed. 1>&2;
       echo The command "cmp tc.out $srcdir/tc.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s '[b-c]' < $srcdir/td.in > td.out 2> td.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test d failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp td.out $srcdir/td.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed d; fi ;; # equal files
    1) echo Test d failed: files td.out and $srcdir/td.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test d may have failed. 1>&2;
       echo The command "cmp td.out $srcdir/td.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s '[\0-\5]' < $srcdir/te.in > te.out 2> te.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test e failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp te.out $srcdir/te.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed e; fi ;; # equal files
    1) echo Test e failed: files te.out and $srcdir/te.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test e may have failed. 1>&2;
       echo The command "cmp te.out $srcdir/te.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[=[=]' < $srcdir/tf.in > tf.out 2> tf.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test f failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tf.out $srcdir/tf.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed f; fi ;; # equal files
    1) echo Test f failed: files tf.out and $srcdir/tf.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test f may have failed. 1>&2;
       echo The command "cmp tf.out $srcdir/tf.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[=]=]' < $srcdir/tg.in > tg.out 2> tg.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test g failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tg.out $srcdir/tg.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed g; fi ;; # equal files
    1) echo Test g failed: files tg.out and $srcdir/tg.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test g may have failed. 1>&2;
       echo The command "cmp tg.out $srcdir/tg.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:xdigit:]' < $srcdir/th.in > th.out 2> th.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test h failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp th.out $srcdir/th.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed h; fi ;; # equal files
    1) echo Test h failed: files th.out and $srcdir/th.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test h may have failed. 1>&2;
       echo The command "cmp th.out $srcdir/th.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:xdigit:]' < $srcdir/ti.in > ti.out 2> ti.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test i failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp ti.out $srcdir/ti.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed i; fi ;; # equal files
    1) echo Test i failed: files ti.out and $srcdir/ti.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test i may have failed. 1>&2;
       echo The command "cmp ti.out $srcdir/ti.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:digit:]' < $srcdir/tj.in > tj.out 2> tj.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test j failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tj.out $srcdir/tj.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed j; fi ;; # equal files
    1) echo Test j failed: files tj.out and $srcdir/tj.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test j may have failed. 1>&2;
       echo The command "cmp tj.out $srcdir/tj.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:digit:]' < $srcdir/tk.in > tk.out 2> tk.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test k failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tk.out $srcdir/tk.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed k; fi ;; # equal files
    1) echo Test k failed: files tk.out and $srcdir/tk.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test k may have failed. 1>&2;
       echo The command "cmp tk.out $srcdir/tk.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:lower:]' < $srcdir/tl.in > tl.out 2> tl.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test l failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tl.out $srcdir/tl.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed l; fi ;; # equal files
    1) echo Test l failed: files tl.out and $srcdir/tl.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test l may have failed. 1>&2;
       echo The command "cmp tl.out $srcdir/tl.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:upper:]' < $srcdir/tm.in > tm.out 2> tm.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test m failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tm.out $srcdir/tm.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed m; fi ;; # equal files
    1) echo Test m failed: files tm.out and $srcdir/tm.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test m may have failed. 1>&2;
       echo The command "cmp tm.out $srcdir/tm.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:lower:][:upper:]' < $srcdir/tn.in > tn.out 2> tn.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test n failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tn.out $srcdir/tn.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed n; fi ;; # equal files
    1) echo Test n failed: files tn.out and $srcdir/tn.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test n may have failed. 1>&2;
       echo The command "cmp tn.out $srcdir/tn.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:alpha:]' < $srcdir/to.in > to.out 2> to.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test o failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp to.out $srcdir/to.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed o; fi ;; # equal files
    1) echo Test o failed: files to.out and $srcdir/to.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test o may have failed. 1>&2;
       echo The command "cmp to.out $srcdir/to.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:alnum:]' < $srcdir/tp.in > tp.out 2> tp.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test p failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tp.out $srcdir/tp.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed p; fi ;; # equal files
    1) echo Test p failed: files tp.out and $srcdir/tp.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test p may have failed. 1>&2;
       echo The command "cmp tp.out $srcdir/tp.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d '[:alnum:]' < $srcdir/tq.in > tq.out 2> tq.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test q failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tq.out $srcdir/tq.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed q; fi ;; # equal files
    1) echo Test q failed: files tq.out and $srcdir/tq.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test q may have failed. 1>&2;
       echo The command "cmp tq.out $srcdir/tq.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds '[:alnum:]' '.' < $srcdir/tr.in > tr.out 2> tr.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test r failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tr.out $srcdir/tr.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed r; fi ;; # equal files
    1) echo Test r failed: files tr.out and $srcdir/tr.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test r may have failed. 1>&2;
       echo The command "cmp tr.out $srcdir/tr.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:alnum:]' '\n' < $srcdir/ts.in > ts.out 2> ts.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test s failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp ts.out $srcdir/ts.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed s; fi ;; # equal files
    1) echo Test s failed: files ts.out and $srcdir/ts.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test s may have failed. 1>&2;
       echo The command "cmp ts.out $srcdir/ts.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:alnum:]' '[\n*]' < $srcdir/tt.in > tt.out 2> tt.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test t failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tt.out $srcdir/tt.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed t; fi ;; # equal files
    1) echo Test t failed: files tt.out and $srcdir/tt.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test t may have failed. 1>&2;
       echo The command "cmp tt.out $srcdir/tt.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds 'b' 'a' < $srcdir/tu.in > tu.out 2> tu.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test u failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tu.out $srcdir/tu.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed u; fi ;; # equal files
    1) echo Test u failed: files tu.out and $srcdir/tu.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test u may have failed. 1>&2;
       echo The command "cmp tu.out $srcdir/tu.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds '[:xdigit:]' 'Z' < $srcdir/tv.in > tv.out 2> tv.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test v failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tv.out $srcdir/tv.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed v; fi ;; # equal files
    1) echo Test v failed: files tv.out and $srcdir/tv.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test v may have failed. 1>&2;
       echo The command "cmp tv.out $srcdir/tv.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds '\350' '\345' < $srcdir/tw.in > tw.out 2> tw.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test w failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tw.out $srcdir/tw.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed w; fi ;; # equal files
    1) echo Test w failed: files tw.out and $srcdir/tw.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test w may have failed. 1>&2;
       echo The command "cmp tw.out $srcdir/tw.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -s 'abcdefghijklmn' '[:*016]' < $srcdir/tx.in > tx.out 2> tx.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test x failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tx.out $srcdir/tx.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed x; fi ;; # equal files
    1) echo Test x failed: files tx.out and $srcdir/tx.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test x may have failed. 1>&2;
       echo The command "cmp tx.out $srcdir/tx.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -d 'a-z' < $srcdir/ty.in > ty.out 2> ty.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test y failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp ty.out $srcdir/ty.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed y; fi ;; # equal files
    1) echo Test y failed: files ty.out and $srcdir/ty.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test y may have failed. 1>&2;
       echo The command "cmp ty.out $srcdir/ty.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds 'a-z' '$.' < $srcdir/tz.in > tz.out 2> tz.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test z failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tz.out $srcdir/tz.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed z; fi ;; # equal files
    1) echo Test z failed: files tz.out and $srcdir/tz.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test z may have failed. 1>&2;
       echo The command "cmp tz.out $srcdir/tz.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a-a' 'z' < $srcdir/tA.in > tA.out 2> tA.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test A failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tA.out $srcdir/tA.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed A; fi ;; # equal files
    1) echo Test A failed: files tA.out and $srcdir/tA.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test A may have failed. 1>&2;
       echo The command "cmp tA.out $srcdir/tA.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a' '''' < $srcdir/tB.in > tB.out 2> tB.err 2> /dev/null
code=$?
if test $code != 1 ; then
  echo Test B failed: cut return code $code differs from expected value 1 1>&2
  errors=`expr $errors + 1`
else
  cmp tB.out $srcdir/tB.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed B; fi ;; # equal files
    1) echo Test B failed: files tB.out and $srcdir/tB.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test B may have failed. 1>&2;
       echo The command "cmp tB.out $srcdir/tB.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  '[:lower:]' '[:upper:]' < $srcdir/tC.in > tC.out 2> tC.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test C failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tC.out $srcdir/tC.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed C; fi ;; # equal files
    1) echo Test C failed: files tC.out and $srcdir/tC.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test C may have failed. 1>&2;
       echo The command "cmp tC.out $srcdir/tC.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  '[:upper:]' '[:lower:]' < $srcdir/tD.in > tD.out 2> tD.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test D failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tD.out $srcdir/tD.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed D; fi ;; # equal files
    1) echo Test D failed: files tD.out and $srcdir/tD.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test D may have failed. 1>&2;
       echo The command "cmp tD.out $srcdir/tD.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a[=*2][=c=]' 'xyyz' < $srcdir/tE.in > tE.out 2> tE.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test E failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tE.out $srcdir/tE.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed E; fi ;; # equal files
    1) echo Test E failed: files tE.out and $srcdir/tE.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test E may have failed. 1>&2;
       echo The command "cmp tE.out $srcdir/tE.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  '[:*3][:digit:]' 'a-m' < $srcdir/tF.in > tF.out 2> tF.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test F failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tF.out $srcdir/tF.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed F; fi ;; # equal files
    1) echo Test F failed: files tF.out and $srcdir/tF.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test F may have failed. 1>&2;
       echo The command "cmp tF.out $srcdir/tF.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a[b*512]c' '1[x*]2' < $srcdir/tG.in > tG.out 2> tG.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test G failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tG.out $srcdir/tG.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed G; fi ;; # equal files
    1) echo Test G failed: files tG.out and $srcdir/tG.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test G may have failed. 1>&2;
       echo The command "cmp tG.out $srcdir/tG.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a[b*513]c' '1[x*]2' < $srcdir/tH.in > tH.out 2> tH.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test H failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tH.out $srcdir/tH.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed H; fi ;; # equal files
    1) echo Test H failed: files tH.out and $srcdir/tH.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test H may have failed. 1>&2;
       echo The command "cmp tH.out $srcdir/tH.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx  'a\-z' 'A-Z' < $srcdir/tI.in > tI.out 2> tI.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test I failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tI.out $srcdir/tI.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed I; fi ;; # equal files
    1) echo Test I failed: files tI.out and $srcdir/tI.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test I may have failed. 1>&2;
       echo The command "cmp tI.out $srcdir/tI.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:upper:]' 'X[Y*]' < $srcdir/tR0.0.in > tR0.0.out 2> tR0.0.err 2> /dev/null
code=$?
if test $code != 1 ; then
  echo Test R0.0 failed: cut return code $code differs from expected value 1 1>&2
  errors=`expr $errors + 1`
else
  cmp tR0.0.out $srcdir/tR0.0.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R0.0; fi ;; # equal files
    1) echo Test R0.0 failed: files tR0.0.out and $srcdir/tR0.0.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R0.0 may have failed. 1>&2;
       echo The command "cmp tR0.0.out $srcdir/tR0.0.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:cntrl:]' 'X[Y*]' < $srcdir/tR0.1.in > tR0.1.out 2> tR0.1.err 2> /dev/null
code=$?
if test $code != 1 ; then
  echo Test R0.1 failed: cut return code $code differs from expected value 1 1>&2
  errors=`expr $errors + 1`
else
  cmp tR0.1.out $srcdir/tR0.1.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R0.1; fi ;; # equal files
    1) echo Test R0.1 failed: files tR0.1.out and $srcdir/tR0.1.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R0.1 may have failed. 1>&2;
       echo The command "cmp tR0.1.out $srcdir/tR0.1.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:upper:]' '[X*]' < $srcdir/tR1.0.in > tR1.0.out 2> tR1.0.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R1.0 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR1.0.out $srcdir/tR1.0.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R1.0; fi ;; # equal files
    1) echo Test R1.0 failed: files tR1.0.out and $srcdir/tR1.0.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R1.0 may have failed. 1>&2;
       echo The command "cmp tR1.0.out $srcdir/tR1.0.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -cs '[:upper:][:digit:]' '[Z*]' < $srcdir/tR1.1.in > tR1.1.out 2> tR1.1.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R1.1 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR1.1.out $srcdir/tR1.1.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R1.1; fi ;; # equal files
    1) echo Test R1.1 failed: files tR1.1.out and $srcdir/tR1.1.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R1.1 may have failed. 1>&2;
       echo The command "cmp tR1.1.out $srcdir/tR1.1.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -dcs '[:lower:]' 'n-rs-z' < $srcdir/tR2.in > tR2.out 2> tR2.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R2 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR2.out $srcdir/tR2.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R2; fi ;; # equal files
    1) echo Test R2 failed: files tR2.out and $srcdir/tR2.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R2 may have failed. 1>&2;
       echo The command "cmp tR2.out $srcdir/tR2.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -ds '[:xdigit:]' '[:alnum:]' < $srcdir/tR3.in > tR3.out 2> tR3.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R3 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR3.out $srcdir/tR3.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R3; fi ;; # equal files
    1) echo Test R3 failed: files tR3.out and $srcdir/tR3.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R3 may have failed. 1>&2;
       echo The command "cmp tR3.out $srcdir/tR3.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -dcs '[:alnum:]' '[:digit:]' < $srcdir/tR4.in > tR4.out 2> tR4.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R4 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR4.out $srcdir/tR4.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R4; fi ;; # equal files
    1) echo Test R4 failed: files tR4.out and $srcdir/tR4.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R4 may have failed. 1>&2;
       echo The command "cmp tR4.out $srcdir/tR4.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -dc '[:lower:]' < $srcdir/tR5.in > tR5.out 2> tR5.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R5 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR5.out $srcdir/tR5.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R5; fi ;; # equal files
    1) echo Test R5 failed: files tR5.out and $srcdir/tR5.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R5 may have failed. 1>&2;
       echo The command "cmp tR5.out $srcdir/tR5.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
$xx -dc '[:upper:]' < $srcdir/tR6.in > tR6.out 2> tR6.err 2> /dev/null
code=$?
if test $code != 0 ; then
  echo Test R6 failed: cut return code $code differs from expected value 0 1>&2
  errors=`expr $errors + 1`
else
  cmp tR6.out $srcdir/tR6.exp
  case $? in
    0) if test "$VERBOSE" ; then echo passed R6; fi ;; # equal files
    1) echo Test R6 failed: files tR6.out and $srcdir/tR6.exp differ 1>&2;
       errors=`expr $errors + 1` ;;
    2) echo Test R6 may have failed. 1>&2;
       echo The command "cmp tR6.out $srcdir/tR6.exp" failed. 1>&2 ;
       errors=`expr $errors + 1` ;;
  esac
fi
if test $errors = 0 ; then
  $echo Passed all tests. 1>&2
else
  $echo Failed $errors tests. 1>&2
fi
test $errors = 0 || errors=1
exit $errors