No empty .Rs/.Re
[netbsd-mini2440.git] / regress / usr.bin / sort / stests
blobff02b5cf435bdd286e72c1c5421a5c38c29b2eca
1 #! /bin/sh
2 # @(#)stests 8.1 (Berkeley) 6/6/93
3 # $NetBSD: stests,v 1.14 2001/05/14 21:31:38 jdolecek Exp $
5 # This code is derived from software contributed to Berkeley by
6 # Peter McIlroy.
8 #Latest version. My sort passes all tests because I wrote it.
9 #We differ only on 25E and 25H.
10 #(I found at least one bug in constructing test 25, and was driven
11 #to rewrite field parsing to clarify it.)
13 #In 25E, -k2.3,2.1b, the fields are not necessarily out of order.
14 #Even if they were, it would be legal (11752-3), although certainly
15 #justification for warning.
17 #On 25H, your answer is as defensible as mine. (Our suggestion
18 #*1 backs mine.)
21 # Tests for the Unix sort utility
22 # Test Posix features except for locale.
23 # Test some nonstandard features if present.
25 # Other tests should be made for files too big to fit in memory.
27 dict=/usr/share/dict/words
29 # Initialize switches for nonstandard features.
30 # Use parenthesized settings for supported features.
32 o=: # officially obsolescent features: +1 -2, misplaced -o (o=)
33 g=: # -g numeric sort including e-format numbers (g=)
34 M=: # -M sort by month names (M=)
35 s=: # -s stable, do not compare raw bytes on equal keys (s=)
36 y= # -y user-specified memory size (y=-y10000)
37 S= # -S non-stable sort
39 # Detect what features are supported, assuming bad options cause
40 # errors. Set switches accordingly.
42 cat <<!
43 Note: some sort(1) implementations (for example GNU sort) may not pass these
44 tests - this suite was made to fit sort(1) using (non-stable) radixsort(3),
45 sort(1) using other algorithm may give different results, though still
46 conform to standard.
50 echo Obsolescent and nonstandard features recognized, if any:
51 if sort +0 </dev/null 2>/dev/null; then
53 echo ' +1 -2'
54 else
55 o="not_tested +POS/-POS"
57 if sort /dev/null -o xx 2>/dev/null; then
58 echo ' displaced -o';
60 if sort -g </dev/null 2>/dev/null; then
62 echo ' -g g-format numbers';
63 else
64 g="not_tested -g"
66 if sort -M </dev/null 2>/dev/null; then
68 echo ' -M months';
69 else
70 M="not_tested -M"
72 if sort -s </dev/null 2>/dev/null; then
74 echo ' -s stable sort';
75 else
76 s="not_tested -s"
78 if sort -S </dev/null 2>/dev/null; then
79 S=-S
80 echo ' -S non-stable sort';
82 if sort -y10000 </dev/null 2>/dev/null; then
83 y=-y10000
84 echo ' -y space';
86 if sort -z10000 </dev/null 2>/dev/null; then
87 echo ' -z size (not exercised)';
89 if sort -T. </dev/null 2>/dev/null; then
90 echo ' -T tempdir (not exercised)';
93 TEST= # major sequence number of test
95 trap "rm -f in in1 out xx -k fields; exit" 0 1 2 13 15
97 # some tests would fail if non-C locale is used
98 unset LANG LC_ALL LC_CTYPE
100 # xsort testno options
101 # Sort file "in" with specified options.
102 # Compare with file "out" if that is supplied,
103 # otherwise make plausibility checks on output
105 # "sum" must be dumb; insensitive to the
106 # order of lines within a file.
107 # System V sum is suitable; sum -5 is the v10 equivalent.
109 xsort () {
110 X="$1"
111 shift
113 if sort $S "$@" in >xx && sort -c $S "$@" xx
114 then
115 if test -f out
116 then
117 cmp xx out >/dev/null && return 0
118 echo "$TEST$X comparison failed - sort $@"
119 else
120 test "`cksum -o2 <in`" = "`cksum -o2 <xx`" && return 0
121 echo "$TEST$X checksum failed - sort $@"
123 else
124 echo "$TEST$X failed - sort $@"
126 return 1
129 # linecount testno file count
130 # declares the given "testno" to be in error if number of
131 # lines in "file" differs from "count"
132 linecount() {
133 awk 'END{ if(NR!='$3') print "'$TEST$1' failed" }' $2
136 # print info about skipped test
137 not_tested() {
138 echo "$TEST$X skipped - flag '$1' not supported"
141 rm -f out
143 #---------------------------------------------------------------
144 TEST=01; echo $TEST # -c status, checksum
145 # obsolescent features go together
146 cat <<! >in
150 rm -f out -o
152 sort $S -c in 2>/dev/null && echo ${TEST}A failed
154 xsort B || '"cksum"' is probably unsuitable - see comments
156 $o sort $S +0 in -o in || echo ${TEST}C failed
158 #---------------------------------------------------------------
159 TEST=02; echo $TEST # output from -c
160 cat <<! >in
165 sort -c $S -r in >out 2>xx && echo ${TEST}A failed
166 test -s out && echo ${TEST}B failed
167 test -s xx && echo option -c is noisy "(probably legal)"
168 test -s xx || echo option -c is quiet "(legal, not classical)"
170 #---------------------------------------------------------------
171 TEST=03; echo $TEST # -n
172 cat <<! >in
173 -99.0
174 -99.1
175 -.0002
178 0010.000000000000000000000000000000000001
183 cat <<! >out
184 -99.1
185 -99.0
187 -.0002
192 0010.000000000000000000000000000000000001
195 xsort "" -n
197 #---------------------------------------------------------------
198 TEST=04; echo $TEST # -b without fields, piping, -c status return
199 cat <<! >in
203 cp in out
205 xsort A -b
207 cat in | sort $S | cat >xx
208 cmp xx out >/dev/null || echo ${TEST}B failed
210 sort $S in | sort -c $S -r 2>/dev/null && echo ${TEST}C failed
212 #---------------------------------------------------------------
213 TEST=05; echo $TEST # fields, reverse fields, -c status return
214 cat <<! >in
215 b b p
216 a b q
219 cat <<! >out
221 a b q
222 b b p
225 $o xsort A +1 -2
227 $o xsort B +1 -2 +2r
229 xsort C -k 2,2
231 xsort D -k 2,2 -k 3r
233 xsort E -k 2,2.0
235 xsort F -k 2,2 -k 1,1 -k 3
237 sort -c $S -k 2 in 2>/dev/null && echo ${TEST}G failed
239 #---------------------------------------------------------------
240 TEST=06; echo $TEST # -t
241 cat <<! >in
245 cp in out
247 $o xsort A -t : -r +0
249 $o xsort B -t : +0 -1
251 xsort C -t : -r -k 1
253 xsort D -t : -k 1,1
255 #---------------------------------------------------------------
256 TEST=07; echo $TEST # -t, character positions in fields
257 # -t: as 1 arg is not strictly conforming, but classical
258 cat <<! >in
259 : ab
260 :bac
262 cat <<! >out
263 :bac
264 : ab
267 $o xsort A -b -t: +1.1
269 $o xsort B -t: +1.1r
271 xsort C -b -t: -k 2.2
273 xsort D -t: -k 2.2r
275 #---------------------------------------------------------------
276 TEST=08; echo $TEST # space and tab as -t characters
277 cat <<! >in
282 cp in out
284 xsort A -t ' ' -k2,2
286 xsort B -t ' ' -k2.1,2.0
288 cat <<! >out
294 xsort C -t ' ' -k2,2
296 xsort D -t ' ' -k2.1,2.0
298 cat <<! >out
304 xsort E -k2
306 cat <<! >out
312 xsort F -k2b
314 #---------------------------------------------------------------
315 TEST=09; echo $TEST # alphabetic as -t character
316 cat <<! >in
321 cp in out
323 xsort "" -tX -k2 -k1r,1
325 #---------------------------------------------------------------
326 TEST=10; echo $TEST # -m
327 cat <<! >in
334 cat <<! >in1
341 cat <<! >out
354 sort $S -m in in1 >xx
355 cmp xx out >/dev/null || echo $TEST failed
357 #---------------------------------------------------------------
358 TEST=11; echo $TEST # multiple files, -o overwites input, -m, -mu
359 cat <<! >in
366 sort $S -o xx in in in in in in in in in in in in in in in in in
367 linecount A xx 68
368 sort $S -o in -mu in in in in in in in in in in in in in in in in in
369 linecount B in 4
370 sort $S -o in -m in in in in in in in in in in in in in in in in in
372 cmp in xx >/dev/null || echo ${TEST}C failed
374 #---------------------------------------------------------------
375 TEST=12; echo $TEST # does -mu pick the first among equals?
376 cat <<! >in
380 ~3B2
386 cat <<! >out
393 xsort A -mudf || echo "(other behavior is legal, not classical)"
395 xsort B -mudf -k1 || echo "(other behavior is legal, not classical)"
397 #---------------------------------------------------------------
398 TEST=13; echo $TEST # long records (>8000 bytes, keys >16000), -r
399 awk '
400 BEGIN { x="x"
401 for(i=1; i<=12; i++) x = x x
402 for(i=15; i<=25; i++) print x i
403 }' >in
404 awk '
405 BEGIN { x="x"
406 for(i=1; i<=12; i++) x = x x
407 for(i=25; i>=15; i--) print x i
408 }' >out
410 xsort A -r
412 xsort B -k 1,1r -k 1
414 #---------------------------------------------------------------
415 TEST=14; echo $TEST "(3 long parts)"
416 awk 'BEGIN { for(i=0; i<100000; i++) print rand() }' | grep -v e >in
417 rm -f out
419 xsort A; echo $TEST "(part A done)"
421 xsort B -n; echo $TEST "(part B done)"
423 # next test is unclean: xx is a hidden side-effect of xsort
425 awk '
426 $0 < x { print "test '${TEST}C' failed"; exit }
427 $0 "" != x { print >"out"; x = $0 }
428 ' xx
430 xsort C -n -u
432 #---------------------------------------------------------------
433 TEST=15; echo $TEST "(long)" # force intermediate files if possible
434 awk 'BEGIN { for(i=0; i<20000; i++) print rand() }' >in
435 rm -f out
437 xsort A -r $y
439 sort $S -r in | awk '$0 "x" != x { print ; x = $0 "x" }' >out
441 xsort B -u -r $y
443 #---------------------------------------------------------------
444 TEST=16; echo $TEST # -nr, -nm, file name -
445 awk 'BEGIN { for(i=-100; i<=100; i+=2) printf "%.10d\n", i }' >in
447 awk 'BEGIN { for(i=-99; i<=100; i+=2) print i }' | sort $S -nr in - >xx
448 awk '$0+0 != 101-NR { print "'${TEST}A' failed"; exit }' xx
450 awk 'BEGIN { for(i=-99; i<=100; i+=2) print i }' | sort $S -mn in - >xx
451 awk '$0+0 != -101+NR { print "'${TEST}B' failed"; exit }' xx
453 #---------------------------------------------------------------
454 TEST=17; echo $TEST # -d, fields without end, modifier override
455 cat <<! >in
462 cat <<! >out
470 $o xsort A -df +0 +0d
472 xsort B -df -k 1 -k 1d
474 #---------------------------------------------------------------
475 TEST=18; echo $TEST # -u on key only
476 cat <<! >in
477 12 y
478 13 z
479 12 x
481 cat <<! >out
482 12 x
483 12 y
484 13 z
487 $o xsort A +0 -1
489 xsort B -k 1,1
491 sort $S -u -k 1,1 in >xx
492 linecount C xx 2
494 #---------------------------------------------------------------
495 TEST=19; echo $TEST # -i, -d, -f
496 cat <<! >xx.c
497 run(i,j){ for( ; i<=j; i++) printf("%.3o %c\n",i,i); }
498 main(){ run(0, 011); /* 012=='\n' */
499 run(013, 0377); }
501 cc xx.c
502 ./a.out >in
503 cat <<! >xx.c
504 run(i,j){ for( ; i<=j; i++) printf("%.3o %c\n",i,i); }
505 main(){ run(0, 011);
506 run(013, ' '-1);
507 run(0177, 0377);
508 run(' ', 0176); }
510 cc xx.c
511 ./a.out >out
513 xsort A -i -k 2
515 cat <<! >xx.c
516 run(i,j){ for( ; i<=j; i++) printf("%.3o %c\n",i,i); }
517 main(){ run(0, 010); /* 011=='\t', 012=='\n' */
518 run(013, ' '-1);
519 run(' '+1, '0'-1);
520 run('9'+1, 'A'-1);
521 run('Z'+1, 'a'-1);
522 run('z'+1, 0377);
523 run('\t', '\t');
524 run(' ', ' ');
525 run('0', '9');
526 run('A', 'Z');
527 run('a', 'z'); }
529 cc xx.c
530 ./a.out >out
532 xsort B -d -k 2
534 cat <<! >xx.c
535 run(i,j){ for( ; i<=j; i++) printf("%.3o %c\n",i,i); }
536 main(){ int i;
537 run(0, 011);
538 run(013, 'A'-1);
539 for(i='A'; i<='Z'; i++)
540 printf("%.3o %c\n%.3o %c\n",i,i,i+040,i+040);
541 run('Z'+1, 'a'-1);
542 run('z'+1, 0377); }
544 cc xx.c
545 ./a.out >out
546 rm xx.c
548 xsort C -f -k 2
550 #---------------------------------------------------------------
551 TEST=20; echo $TEST # -d, -f, -b applies only to fields
552 cat <<! >in
557 cp in out
559 xsort A -d
561 xsort B -f
563 cat <<! >out
569 xsort C -dfb
571 #---------------------------------------------------------------
572 TEST=21; echo $TEST # behavior of null bytes
573 cat <<'!' >xx.c
574 main() { printf("%cb\n%ca\n",0,0); }
576 cc xx.c
577 ./a.out >in
578 sort $S in >xx
579 cmp in xx >/dev/null && echo ${TEST}A failed
580 test "`wc -c <in`" = "`wc -c <xx`" || echo ${TEST}B failed
581 rm xx.c a.out
583 #---------------------------------------------------------------
584 TEST=22; echo $TEST # field limits
585 cat <<! >in
591 cat <<! >out
598 xsort "" -r -k1,1 -k2n
600 #---------------------------------------------------------------
601 TEST=23; echo $TEST # empty file
603 sort $S -o xx </dev/null
604 cmp xx /dev/null 2>/dev/null || echo ${TEST}A failed
606 sort $S -c </dev/null || echo ${TEST}B failed
608 sort $S -cu </dev/null || echo ${TEST}C failed
610 #---------------------------------------------------------------
611 TEST=24; echo $TEST # many fields
612 cat <<! >in
613 0:2:3:4:5:6:7:8:9
614 1:1:3:4:5:6:7:8:9
615 1:2:2:4:5:6:7:8:9
616 1:2:3:3:5:6:7:8:9
617 1:2:3:4:4:6:7:8:9
618 1:2:3:4:5:5:7:8:9
619 1:2:3:4:5:6:6:8:9
620 1:2:3:4:5:6:7:7:9
621 1:2:3:4:5:6:7:8:8
623 cat <<! >out
624 1:2:3:4:5:6:7:8:8
625 1:2:3:4:5:6:7:7:9
626 1:2:3:4:5:6:6:8:9
627 1:2:3:4:5:5:7:8:9
628 1:2:3:4:4:6:7:8:9
629 1:2:3:3:5:6:7:8:9
630 1:2:2:4:5:6:7:8:9
631 1:1:3:4:5:6:7:8:9
632 0:2:3:4:5:6:7:8:9
635 xsort "" -t: -k9 -k8 -k7 -k6 -k5 -k4 -k3 -k2 -k1
637 #---------------------------------------------------------------
638 TEST=25; echo $TEST # variously specified alpha fields
639 # numbers give the correct orderings
640 cat <<! >in
641 01:04:19:01:16:01:21:01 a
642 02:03:13:15:13:19:15:02 a
643 03:02:07:09:07:13:09:03 a
644 04:01:01:03:01:07:03:04 a
645 05:08:20:16:17:02:20:05 aa
646 06:07:14:18:14:20:14:06 aa
647 07:06:08:10:08:14:08:07 aa
648 08:05:02:04:02:08:02:08 aa
649 09:16:22:02:22:04:24:13 b
650 10:15:16:20:19:22:18:14 b
651 11:14:10:12:10:16:12:15 b
652 12:13:04:06:04:10:06:16 b
653 13:24:24:22:24:06:22:21 bb
654 14:23:18:24:21:24:16:22 bb
655 15:22:12:14:12:18:10:23 bb
656 16:21:06:08:06:12:04:24 bb
657 17:12:21:21:18:03:19:09 ab
658 18:11:15:19:15:21:13:10 ab
659 19:10:09:11:09:15:07:11 ab
660 20:09:03:05:03:09:01:12 ab
661 21:20:23:17:23:05:23:17 ba
662 22:19:17:23:20:23:17:18 ba
663 23:18:11:13:11:17:11:19 ba
664 24:17:05:07:05:11:05:20 ba
666 sort $S -k2b -k2 in >xx &&
667 sort -c -t: -k2n xx 2>/dev/null || echo ${TEST}A failed
668 sort $S -k2,2.1b -k2 in >xx &&
669 sort -c -t: -k3n xx 2>/dev/null || echo ${TEST}B failed
670 sort $S -k2.3 -k2 in >xx &&
671 sort -c -t: -k4n xx 2>/dev/null || echo ${TEST}C failed
672 sort $S -k2b,2.3 -k2 in >xx &&
673 sort -c -t: -k5n xx 2>/dev/null || echo ${TEST}D failed
674 sort $S -k2.3,2.1b -k2 in >xx &&
675 sort -c -t: -k6n xx 2>/dev/null || echo ${TEST}E failed
676 sort $S -k2,2.1b -k2r in >xx &&
677 sort -c -t: -k7n xx 2>/dev/null || echo ${TEST}F failed
678 sort $S -b -k2,2 -k2 in >xx &&
679 sort -c -t: -k8n xx 2>/dev/null || echo ${TEST}G failed
680 sort $S -b -k2,2b -k2 in >xx && # perhaps same as G
681 sort -c -t: -k3n xx 2>/dev/null || echo ${TEST}H failed\
682 "(standard is not clear on this)"
684 #---------------------------------------------------------------
685 TEST=26; echo $TEST # empty fields, out of bounds fields
686 cat <<! >in
694 cp in out
696 xsort "" -k2.2,2.1 -k2.3,2.4
698 #---------------------------------------------------------------
699 TEST=27; echo $TEST # displaced -o
700 rm -f out
702 $o sort -S /dev/null -o out || $o echo ${TEST}B failed
703 $o test -f out || $o echo ${TEST}C failed
705 #---------------------------------------------------------------
706 TEST=28; echo $TEST # apparently nonmonotone field specs
707 cat <<! >in
708 aaaa c
712 cp in out
714 $o xsort A +1 -0.3 +1.4 -1.5
716 xsort B -k2,1.3 -k2.5,2.5
718 #---------------------------------------------------------------
719 TEST=29; echo $TEST # determination of end of option list
720 cat >-k <<!
723 rm -f out -c
725 sort $S -- -k </dev/null >xx || echo ${TEST}A argument failed
726 cmp xx -k || echo ${TEST}A comparison failed
728 sort $S - -c </dev/null 2>/dev/null && echo ${TEST}B failed
730 #---------------------------------------------------------------
731 TEST=30; echo $TEST # missing newline
732 awk 'BEGIN{ printf "%s", "x"}' | sort >xx
733 wc -c <xx | awk '$1!=2{ print "'${TEST}' failed" }'
735 #---------------------------------------------------------------
736 TEST=31; echo $TEST # -M, multiple fields
737 cat <<! >in
738 jan 10 1900
739 Feb 26 1900
740 feb 25 1900
741 January xx 1900
742 August 11 1900
743 jan 15 1990
744 feb 22 1990
745 mar 15 1990
746 apr 1 1990
747 may 45 1990
748 jun 14 1990
749 jul 4 1990
750 aug 1~ 1990
751 aug 11 1990
752 sep 1 1990
753 oct 12 1990
754 nov 24 1990
755 dec 25 1990
756 never 3 1990
757 Dec 25 1990
759 cat <<! >out
760 January xx 1900
761 jan 10 1900
762 feb 25 1900
763 Feb 26 1900
764 August 11 1900
765 never 3 1990
766 jan 15 1990
767 feb 22 1990
768 mar 15 1990
769 apr 1 1990
770 may 45 1990
771 jun 14 1990
772 jul 4 1990
773 aug 1~ 1990
774 aug 11 1990
775 sep 1 1990
776 oct 12 1990
777 nov 24 1990
778 Dec 25 1990
779 dec 25 1990
782 $M xsort "" -k3n -k1M -k2n
784 #---------------------------------------------------------------
785 TEST=32; echo $TEST # -M case insensitivity, -r
786 cat <<! >in
788 june
789 january
790 december
792 cat <<! >out
793 december
794 june
795 january
799 $M xsort "" -Mr
801 #---------------------------------------------------------------
802 TEST=33; echo $TEST # -g
803 cat <<! >in
812 cat <<! >out
822 $g xsort "" -g
824 #---------------------------------------------------------------
825 TEST=34; echo $TEST # -g wide operands
826 cat <<! >in
827 .99999999999999999999
828 099999999999999999999e-21
829 099999999999999999999e-19
830 .1e1
832 cat <<! >out
833 099999999999999999999e-21
834 .99999999999999999999
835 .1e1
836 099999999999999999999e-19
839 $g xsort A -g
841 cat <<! >out
842 .1e1
843 .99999999999999999999
844 099999999999999999999e-19
845 099999999999999999999e-21
848 xsort B -n
850 #---------------------------------------------------------------
851 TEST=35; echo $TEST #-g, -u with different fp reps
852 cat <<! >in
855 0.10
858 -100e-3
861 cat <<! >out
863 -100e-3
868 0.10
871 if [ -z "$g" ]; then
872 xsort A -g
873 sort $S -gu in >xx && $g sort -c $S -gu xx || echo ${TEST}B failed
874 linecount C xx 3
875 else
876 # -g not supported
877 not_tested '-g'
880 #---------------------------------------------------------------
881 TEST=36; echo $TEST # -s
882 cat <<! >in
890 cat <<! >out
899 $s xsort "" -s -k1,1
901 #---------------------------------------------------------------
902 TEST=37; echo $TEST # -s, multiple files
903 cat <<! >in
907 cat <<! >in1
912 cat <<! >out
918 $s sort -smru -k1,1 in in in1 in1 >xx
919 $s cmp xx out >/dev/null || echo $TEST failed - sort -smru -k1,1
921 #---------------------------------------------------------------
922 TEST=38; echo $TEST # -s
923 $s awk '
924 BEGIN {
925 for(i=1; i<50; i++)
926 for(j=1; j<=i; j++) {
927 print i, 2 >"in"
928 print i, 1 >"in1"
932 $s sort -m -s -k1,1n in in1 >out
934 $s awk '
935 func stop() { print "'$TEST' comparison failed - sort -m -s -k1,1n"; exit }
936 $1!=last1 { if(count!=last1 || $2!=2) stop();
937 count = 0}
938 $1==last1 && $2!=last2 { if(count!=last1 || $2!=1) stop();
939 count = 0 }
940 { count++; last1 = $1; last2 = $2 }
941 ' out
942 #---------------------------------------------------------------
943 TEST=39; echo $TEST # sort already sorted dictionary
944 sort -f $dict | cmp -s - $dict || echo $TEST failed - sort -f $dict
946 #---------------------------------------------------------------
947 TEST=40; echo "$TEST (long)" # long lines test
949 line1="abcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghij"
950 line2="bcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijk"
952 rm -f in out
954 # generate two out-of-order long lines (roughly 70 KB each), and try sort
955 # them
956 awk '
957 BEGIN {
958 line1 = "'"${line1}"'"
959 line2 = "'"${line2}"'"
960 for(i=0; i<10; i++) {
961 line1 = line1 line1
962 line2 = line2 line2
964 print line2 > "in"
965 print line1 > "in"
967 print line1 > "out"
968 print line2 > "out"
971 xsort "A"
973 # generate already sorted file using $dict, only append space and
974 # long string to each line to make lines longer than usual
975 # use only first 200 lines (sort file approx. 14MB)
976 cat $dict | awk '
977 BEGIN {
978 line = "'"$line1"'"
979 for(i=0; i<10; i++)
980 line = line line
981 idx = 0
983 /^/ { print $1 " " line; if (idx++ > 200) exit 0 }' > in
984 ln -sf in out
985 xsort "B" -f
987 #---------------------------------------------------------------
988 TEST=41; echo $TEST # sort -f empty item; previously bombed
989 cat /dev/null | sort -f
991 #---------------------------------------------------------------
992 TEST=42; echo $TEST # sort -H $dict; previously bombed
993 sort -H -f $dict | cmp -s - $dict || echo $TEST failed - sort -H -f $dict