1# $NetBSD: t_sort.sh,v 1.1 2012/03/17 16:33:15 jruoho Exp $
2#
3# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25# POSSIBILITY OF SUCH DAMAGE.
26#
27
28# The -S flag in NetBSD sort enables non-stable sorting order. This flag
29# doesn't exist in FreeBSD sort, and instead indicates buffer size, so all
30# instances of this flag should be removed.
31#
32# For tests that expect exact output, but where some lines may compare
33# the same, the flag -s should be added to enforce an expected sorting order.
34
35atf_test_case basic
36basic_head()
37{
38	atf_set "descr" "Basic functionality test"
39}
40basic_body()
41{
42	cat >in <<EOF
43z b m f
44y c o e
45x a n h
46x a n g
47EOF
48
49	cat >expout <<EOF
50x a n g
51x a n h
52y c o e
53z b m f
54EOF
55
56	atf_check -o file:expout sort in
57}
58
59atf_test_case empty_file
60empty_file_head()
61{
62	atf_set "descr" "Tests sorting an empty file"
63}
64empty_file_body()
65{
66	touch empty
67	atf_check -o empty sort empty
68	atf_check sort -c empty
69	atf_check sort -c -u empty
70}
71
72atf_test_case end_of_options
73end_of_options_head()
74{
75	atf_set "descr" "Determination of end of option list"
76}
77end_of_options_body()
78{
79	echo x >-k
80	atf_check -o file:-k -x "sort -- -k </dev/null"
81	atf_check -s not-exit:1 -e ignore -x "sort - -c </dev/null"
82}
83
84atf_test_case missing_newline
85missing_newline_head()
86{
87	atf_set "descr" "Tests with missing new line in input file"
88}
89missing_newline_body()
90{
91	printf '%s' x >in
92	atf_check -o inline:'x\n' sort in
93}
94
95atf_test_case null_bytes
96null_bytes_head()
97{
98	atf_set "descr" "Tests the behavior of null bytes"
99}
100null_bytes_body()
101{
102	printf '\0b\n\0a\n' >in
103	atf_check -o inline:'\0a\n\0b\n' sort in
104}
105
106atf_test_case long_records
107long_records_head()
108{
109	atf_set "descr" "Tests long lines and keys"
110}
111long_records_body()
112{
113	awk 'BEGIN {	x="x"
114	for(i=1; i<=12; i++) x = x x
115	for(i=15; i<=25; i++) print x i
116}' >in
117
118	awk 'BEGIN {	x="x"
119	for(i=1; i<=12; i++) x = x x
120	for(i=25; i>=15; i--) print x i
121}' >out
122
123	atf_check -o file:out sort -r in
124	atf_check -o file:out sort -k 1,1r -k 1 in
125}
126
127atf_test_case long_file
128long_file_head()
129{
130	atf_set "descr" "Tests with a long file to try to force intermediate" \
131	    "files"
132}
133long_file_body()
134{
135	awk 'BEGIN { for(i=0; i<20000; i++) print rand() }' >in
136	sort -r in | awk '$0 "x" != x { print ; x = $0 "x" }' >out
137	atf_check -o file:out sort -u -r in
138}
139
140atf_test_case any_char
141any_char_head()
142{
143	atf_set "descr" "Tests with files containing non-printable/extended" \
144	    "characters"
145}
146any_char_body()
147{
148	atf_check -o file:$(atf_get_srcdir)/d_any_char_dflag_out.txt \
149	    sort -d -k 2 $(atf_get_srcdir)/d_any_char_in.txt
150
151	atf_check -o file:$(atf_get_srcdir)/d_any_char_fflag_out.txt \
152	    sort -f -k 2 $(atf_get_srcdir)/d_any_char_in.txt
153
154	atf_check -o file:$(atf_get_srcdir)/d_any_char_iflag_out.txt \
155	    sort -i -k 2 $(atf_get_srcdir)/d_any_char_in.txt
156}
157
158atf_test_case bflag
159bflag_head()
160{
161	atf_set "descr" "Tests the -b flag"
162}
163bflag_body()
164{
165	atf_expect_fail "Behavior differs from NetBSD"
166	cat >in <<EOF
167  b
168 a
169EOF
170
171	atf_check -o file:in sort -b in
172	atf_check -o file:in -x "sort -b <in"
173	atf_check -s exit:1 -o ignore -e ignore -x "sort in | sort -c -r"
174}
175
176atf_test_case cflag
177cflag_head()
178{
179	atf_set "descr" "Tests the -c flag"
180}
181cflag_body()
182{
183	cat >in <<EOF
184b
185a
186EOF
187
188	atf_check -s exit:1 -e ignore sort -c in
189}
190
191atf_test_case kflag_one_field
192kflag_one_field_head()
193{
194	atf_set "descr" "Tests the -k flag with one field"
195}
196kflag_one_field_body()
197{
198	cat >in <<EOF
199z b m f
200y c o e
201x a n h
202x a n g
203EOF
204
205	cat >expout <<EOF
206x a n g
207x a n h
208z b m f
209y c o e
210EOF
211
212	atf_check -o file:expout sort -k2.1 in
213}
214
215atf_test_case kflag_two_fields
216kflag_two_fields_head()
217{
218	atf_set "descr" "Tests the -k flag with two fields"
219}
220kflag_two_fields_body()
221{
222	cat >in <<EOF
223z b m f
224y c o e
225x a n h
226x a n g
227EOF
228
229	cat >expout <<EOF
230x a n h
231x a n g
232z b m f
233y c o e
234EOF
235	atf_check -o file:expout sort -s -k2.1,2.0 in
236}
237
238atf_test_case kflag_many_fields
239kflag_many_fields_head()
240{
241	atf_set "descr" "Tests the -k flag with many fields"
242}
243kflag_many_fields_body()
244{
245	cat >in <<EOF
2460:2:3:4:5:6:7:8:9
2471:1:3:4:5:6:7:8:9
2481:2:2:4:5:6:7:8:9
2491:2:3:3:5:6:7:8:9
2501:2:3:4:4:6:7:8:9
2511:2:3:4:5:5:7:8:9
2521:2:3:4:5:6:6:8:9
2531:2:3:4:5:6:7:7:9
2541:2:3:4:5:6:7:8:8
255EOF
256
257	cat >out <<EOF
2581:2:3:4:5:6:7:8:8
2591:2:3:4:5:6:7:7:9
2601:2:3:4:5:6:6:8:9
2611:2:3:4:5:5:7:8:9
2621:2:3:4:4:6:7:8:9
2631:2:3:3:5:6:7:8:9
2641:2:2:4:5:6:7:8:9
2651:1:3:4:5:6:7:8:9
2660:2:3:4:5:6:7:8:9
267EOF
268
269	atf_check -o file:out sort -t: -k9 -k8 -k7 -k6 -k5 -k4 -k3 \
270	    -k2 -k1 in
271}
272
273atf_test_case kflag_outofbounds
274kflag_outofbounds_head()
275{
276	atf_set "descr" "Tests the -k flag with out of bounds fields"
277}
278kflag_outofbounds_body()
279{
280	cat >in <<EOF
2810 5
2821 4
2832 3
2843 2
2854 1
2865 0
287EOF
288
289	atf_check -o file:in sort -k2.2,2.1 -k2.3,2.4 in
290}
291
292atf_test_case kflag_nonmonotone
293kflag_nonmonotone_head()
294{
295	atf_set "descr" "Tests the -k flag with apparently nonmonotone" \
296	    "field specs"
297}
298kflag_nonmonotone_body()
299{
300	cat >in <<EOF
301aaaa c
302x a
3030 b
304EOF
305
306	atf_check -o file:in sort -k2,1.3 -k2.5,2.5 in
307}
308
309atf_test_case kflag_limits
310kflag_limits_head()
311{
312	atf_set "descr" "Tests the -k flag field limits"
313}
314kflag_limits_body()
315{
316	cat >in <<EOF
317a	2
318a	1
319b	2
320b	1
321EOF
322
323	cat >out <<EOF
324b	2
325b	1
326a	2
327a	1
328EOF
329
330	# On FreeBSD, key options override global options,
331	# so r is required as an option for the second key.
332	atf_check -o file:out sort -r -k1,1 -k2nr in
333}
334
335atf_test_case kflag_alpha
336kflag_alpha_head()
337{
338	atf_set "descr" "Tests the -k flag with various alpha fields"
339}
340kflag_alpha_body()
341{
342	sort >in <<EOF
34301:04:19:01:16:01:21:01 a
34402:03:13:15:13:19:15:02  a
34503:02:07:09:07:13:09:03   a
34604:01:01:03:01:07:03:04    a
34705:08:20:16:17:02:20:05 aa
34806:07:14:18:14:20:14:06  aa
34907:06:08:10:08:14:08:07   aa
35008:05:02:04:02:08:02:08    aa
35109:16:22:02:22:04:24:13 b
35210:15:16:20:19:22:18:14  b
35311:14:10:12:10:16:12:15   b
35412:13:04:06:04:10:06:16    b
35513:24:24:22:24:06:22:21 bb
35614:23:18:24:21:24:16:22  bb
35715:22:12:14:12:18:10:23   bb
35816:21:06:08:06:12:04:24    bb
35917:12:21:21:18:03:19:09 ab
36018:11:15:19:15:21:13:10  ab
36119:10:09:11:09:15:07:11   ab
36220:09:03:05:03:09:01:12    ab
36321:20:23:17:23:05:23:17 ba
36422:19:17:23:20:23:17:18  ba
36523:18:11:13:11:17:11:19   ba
36624:17:05:07:05:11:05:20    ba
367EOF
368
369	atf_check -x "sort -k2b -k2 in >xx"
370	atf_check -e ignore sort -c -t: -k2n xx
371
372	atf_check -x "sort -k2,2.1b -k2 in >xx"
373	atf_check -e ignore sort -c -t: -k3n xx
374
375	atf_check -x "sort -k2.3 -k2 in >xx"
376	atf_check -e ignore sort -c -t: -k4n xx
377
378	atf_check -x "sort -k2b,2.3 -k2 in >xx"
379	atf_check -e ignore sort -c -t: -k5n xx
380
381	atf_check -x "sort -k2.3,2.1b -k2 in >xx"
382	atf_check -e ignore sort -c -t: -k6n xx
383
384	atf_check -x "sort -k2,2.1b -k2r in >xx"
385	atf_check -e ignore sort -c -t: -k7n xx
386
387	atf_check -x "sort -b -k2,2 -k2 in >xx"
388	atf_check -e ignore sort -c -t: -k8n xx
389
390	# XXX This test is broken.  The standard is not clear on the behavior.
391	#atf_check -x "sort -S -b -k2,2b -k2 in >xx"
392	#atf_check -e ignore sort -c -t: -k3n xx
393}
394
395atf_test_case kflag_no_end
396kflag_no_end_head()
397{
398	atf_set "descr" "Tests the -k flag with a field without end"
399}
400kflag_no_end_body()
401{
402	cat >in <<EOF
403a-B
404a+b
405a b
406A+b
407a	b
408EOF
409
410	cat >out <<EOF
411a	b
412a b
413A+b
414a-B
415a+b
416EOF
417
418	atf_check -o file:out sort -df -k 1 -k 1d <in
419}
420
421atf_test_case mflag
422mflag_head()
423{
424	atf_set "descr" "Tests the -m flag"
425}
426mflag_body()
427{
428	cat >in1 <<EOF
429a
430ab
431ab
432bc
433ca
434EOF
435	cat >in2 <<EOF
436Z
437a
438aa
439ac
440c
441EOF
442	cat >out <<EOF
443Z
444a
445a
446aa
447ab
448ab
449ac
450bc
451c
452ca
453EOF
454
455	atf_check -o file:out sort -m in1 in2
456}
457
458atf_test_case mflag_uflag
459mflag_uflag_head()
460{
461	atf_set "descr" "Tests the -m flag together with -u"
462}
463mflag_uflag_body()
464{
465	cat >in <<EOF
466a
467b
468c
469d
470EOF
471
472	atf_check -o file:in sort -m -u in
473}
474
475atf_test_case mflag_uflag_first
476mflag_uflag_first_head()
477{
478	atf_set "descr" "Tests that the -m flag together with -u picks the" \
479	    "first among equal"
480}
481mflag_uflag_first_body()
482{
483	cat >in <<EOF
4843B
4853b
4863B2
487~3B2
4884.1
48941
4905
4915.
492EOF
493
494	cat >out <<EOF
4953B
4963B2
4974.1
4985
499EOF
500
501	atf_check -o file:out sort -mudf in
502	atf_check -o file:out sort -mudf -k1 in
503}
504
505atf_test_case nflag
506nflag_head()
507{
508	atf_set "descr" "Tests the -n flag"
509}
510nflag_body()
511{
512	cat >in <<EOF
513-99.0
514-99.1
515-.0002
516-10
5172
5180010.000000000000000000000000000000000001
51910
5203x
521x
522EOF
523
524	cat >expout <<EOF
525-99.1
526-99.0
527-10
528-.0002
529x
5302
5313x
53210
5330010.000000000000000000000000000000000001
534EOF
535
536	atf_check -o file:expout sort -n in
537}
538
539atf_test_case nflag_rflag
540nflag_rflag_head()
541{
542	atf_set "descr" "Tests the -n and -r flag combination"
543}
544nflag_rflag_body()
545{
546	cat >in <<EOF
5471
548123
5492
550EOF
551
552	cat >expout <<EOF
553123
5542
5551
556EOF
557
558	atf_check -o file:expout sort -rn in
559}
560
561atf_test_case oflag
562oflag_head()
563{
564	atf_set "descr" "Tests the -o flag"
565}
566oflag_body()
567{
568	cat >in <<EOF
5691
5701
5712
5722
5733
5743
5754
5764
577EOF
578
579	atf_check sort -u -o in in
580
581	cat >expout <<EOF
5821
5832
5843
5854
586EOF
587
588	atf_check -o file:expout cat in
589}
590
591atf_test_case oflag_displaced
592oflag_displaced_head()
593{
594	atf_set "descr" "Tests the -o flag after the file names"
595}
596oflag_displaced_body()
597{
598	atf_check sort /dev/null -o out
599	test -f out || atf_fail "File not created"
600}
601
602atf_test_case rflag
603rflag_head()
604{
605	atf_set "descr" "Tests the -r flag"
606}
607rflag_body()
608{
609	cat >in <<EOF
610z b m f
611y c o e
612x a n h
613x a n g
614EOF
615
616	cat >expout <<EOF
617z b m f
618y c o e
619x a n h
620x a n g
621EOF
622
623	atf_check -o file:expout sort -r in
624}
625
626atf_test_case sflag
627sflag_head()
628{
629	atf_set "descr" "Tests the -s flag"
630}
631sflag_body()
632{
633	cat >in <<EOF
634a 2
635b 1
636c 2
637a 1
638b 2
639c 1
640EOF
641
642	cat >out <<EOF
643a 2
644a 1
645b 1
646b 2
647c 2
648c 1
649EOF
650
651	atf_check -o file:out sort -s -k1,1 in
652}
653
654atf_test_case sflag_many_files
655sflag_many_files_head()
656{
657	atf_set "descr" "Tests the -s flag with multiple files"
658}
659sflag_many_files_body()
660{
661	cat >in1 <<EOF
662c 2
663a 2
664EOF
665
666	cat >in2 <<EOF
667c 1
668b 1
669a 1
670EOF
671
672	cat >out <<EOF
673c 2
674b 1
675a 2
676EOF
677
678	atf_check -o file:out sort -smru -k1,1 in1 in1 in2 in2
679}
680
681atf_test_case tflag
682tflag_head()
683{
684	atf_set "descr" "Tests the -t flag"
685}
686tflag_body()
687{
688	cat >in <<EOF
689a:
690a!
691EOF
692
693	atf_check -o file:in sort -t : -r +0 in
694	atf_check -o file:in sort -t : +0 -1 in
695	atf_check -o file:in sort -t : -r -k 1 in
696	atf_check -o file:in sort -t : -k 1,1 in
697}
698
699atf_test_case tflag_alphabetic
700tflag_alphabetic_head()
701{
702	atf_set "descr" "Tests the -t flag with a character as the delimiter"
703}
704tflag_alphabetic_body()
705{
706	cat >in <<EOF
707zXa
708yXa
709zXb
710EOF
711
712	atf_check -o file:in sort -tX -k2 -k1r,1 in
713}
714
715atf_test_case tflag_char_pos
716tflag_char_pos_head()
717{
718	atf_set "descr" "Tests the -t flag with character positions in fields"
719}
720tflag_char_pos_body()
721{
722	cat >in <<EOF
723: ab
724:bac
725EOF
726
727	cat >out <<EOF
728:bac
729: ab
730EOF
731
732	atf_check -o file:out sort -b -t: +1.1 in
733	atf_check -o file:out sort -t: +1.1r in
734	atf_check -o file:out sort -b -t: -k 2.2 in
735	atf_check -o file:out sort -t: -k 2.2r in
736}
737
738atf_test_case tflag_whitespace
739tflag_whitespace_head()
740{
741	atf_set "descr" "Tests the -t flag with spaces and tabs as the" \
742	    "delimiter"
743}
744tflag_whitespace_body()
745{
746	cat >in <<EOF
747 b c
748 b	c
749	b c
750EOF
751
752	atf_check -o file:in sort -t ' ' -k2,2 in
753	atf_check -o file:in sort -t ' ' -k2.1,2.0 in
754
755	cat >out <<EOF
756 b c
757	b c
758 b	c
759EOF
760
761	atf_check -o file:out sort -t '	' -k2,2 in
762	atf_check -o file:out sort -t '	' -k2.1,2.0 in
763
764	cat >out <<EOF
765 b	c
766	b c
767 b c
768EOF
769
770	atf_check -o file:out sort -k2 in
771
772	cat >out <<EOF
773	b c
774 b	c
775 b c
776EOF
777
778	atf_check -o file:out sort -k2b in
779}
780
781atf_test_case uflag
782uflag_head()
783{
784	atf_set "descr" "Tests the -u flag"
785}
786uflag_body()
787{
788	cat >in <<EOF
789a
790aa
791aaa
792aa
793EOF
794
795	cat >expout <<EOF
796a
797aa
798aaa
799EOF
800
801	atf_check -o file:expout sort -u in
802}
803
804atf_test_case uflag_rflag
805uflag_rflag_head()
806{
807	atf_set "descr" "Tests the -u and -r flag combination"
808}
809uflag_rflag_body()
810{
811	cat >in <<EOF
812a
813aa
814aaa
815aa
816EOF
817
818	cat >expout <<EOF
819aaa
820aa
821a
822EOF
823
824	atf_check -o file:expout sort -ru in
825}
826
827atf_test_case plus_one
828plus_one_head()
829{
830	atf_set "descr" "Tests +- addressing: +1 should become -k2.1"
831}
832plus_one_body()
833{
834	cat >in <<EOF
835z b m f
836y c o e
837x a n h
838x a n g
839EOF
840
841	cat >expout <<EOF
842x a n g
843x a n h
844z b m f
845y c o e
846EOF
847
848	atf_check -o file:expout sort +1 in
849}
850
851atf_test_case plus_one_minus_two
852plus_one_minus_two_head()
853{
854	atf_set "descr" "Tests +- addressing: +1 -2 should become -k2.1,2.0"
855}
856plus_one_minus_two_body()
857{
858	cat >in <<EOF
859z b m f
860y c o e
861x a n h
862x a n g
863EOF
864
865	cat >expout <<EOF
866x a n h
867x a n g
868z b m f
869y c o e
870EOF
871
872	atf_check -o file:expout sort -s +1 -2 in
873}
874
875atf_test_case plus_zero
876plus_zero_head()
877{
878	atf_set "descr" "Tests +- addressing: '-- +0' raised a '-k1.1: No" \
879	    "such file or directory' error"
880}
881plus_zero_body()
882{
883	echo 'good contents' >./+0
884
885	atf_check -o file:+0 sort -- +0
886}
887
888atf_test_case plus_nonmonotone
889plus_nonmonotone_head()
890{
891	atf_set "descr" "Tests += addressing: apparently nonmonotone field" \
892	    "specs"
893}
894plus_nonmonotone_body()
895{
896	cat >in <<EOF
897aaaa c
898x a
8990 b
900EOF
901
902	atf_check -o file:in sort +1 -0.3 +1.4 -1.5 in
903}
904
905atf_test_case plus_as_path
906plus_as_path_head()
907{
908	atf_set "descr" "Tests +- addressing: 'file +0' raised a '-k1.1: No" \
909	    "such file or directory' error"
910}
911plus_as_path_body()
912{
913	atf_expect_fail "Behavior differs from NetBSD"
914	echo 'good contents' >./+0
915	echo 'more contents' >in
916	cat ./+0 in >expout
917
918	atf_check -o file:expout sort in +0
919}
920
921atf_test_case plus_bad_tempfile
922plus_bad_tempfile_head()
923{
924	atf_set "descr" "Tests +- addressing: intermediate wrong behavior" \
925	    "that raised a '+0: No such file or directory' error"
926}
927plus_bad_tempfile_body()
928{
929	echo 'good contents' >in
930	atf_check -o file:in sort -T /tmp +0 in
931}
932
933atf_test_case plus_rflag_invalid
934plus_rflag_invalid_head()
935{
936	atf_set "descr" "Tests +- addressing: invalid record delimiter"
937}
938plus_rflag_invalid_body()
939{
940	atf_expect_fail "-R flag not available on FreeBSD"
941
942	(
943	    echo 'z b m f'
944	    echo 'y c o e'
945	    echo 'x a n h'
946	    echo 'x a n g'
947	) | tr '\n' '+' >in
948
949	atf_check -o inline:'x a n g+x a n h+z b m f+y c o e+' \
950	    sort -R + -k2 in
951}
952
953atf_test_case plus_tflag
954plus_tflag_head()
955{
956	atf_set "descr" "Tests +- addressing: using -T caused a 'No such file" \
957	    "or directory' error"
958}
959plus_tflag_body()
960{
961	mkdir ./+
962	yes | sed 200000q | sort -T + >/dev/null || atf_fail "program failed"
963}
964
965atf_test_case plus_no_end
966plus_no_end_head()
967{
968	atf_set "descr" "Tests +- addressing: field without end"
969}
970plus_no_end_body()
971{
972	cat >in <<EOF
973a-B
974a+b
975a b
976A+b
977a	b
978EOF
979
980	cat >out <<EOF
981a	b
982a b
983A+b
984a-B
985a+b
986EOF
987
988	atf_check -o file:out sort -df +0 +0d in
989}
990
991atf_init_test_cases()
992{
993	atf_add_test_case basic
994	atf_add_test_case empty_file
995	atf_add_test_case end_of_options
996	atf_add_test_case missing_newline
997	atf_add_test_case null_bytes
998	atf_add_test_case long_records
999	atf_add_test_case long_file
1000	atf_add_test_case any_char
1001	atf_add_test_case bflag
1002	atf_add_test_case cflag
1003	atf_add_test_case kflag_one_field
1004	atf_add_test_case kflag_two_fields
1005	atf_add_test_case kflag_many_fields
1006	atf_add_test_case kflag_outofbounds
1007	atf_add_test_case kflag_nonmonotone
1008	atf_add_test_case kflag_limits
1009	atf_add_test_case kflag_alpha
1010	atf_add_test_case kflag_no_end
1011	atf_add_test_case mflag
1012	atf_add_test_case mflag_uflag
1013	atf_add_test_case mflag_uflag_first
1014	atf_add_test_case nflag
1015	atf_add_test_case nflag_rflag
1016	atf_add_test_case oflag
1017	atf_add_test_case oflag_displaced
1018	atf_add_test_case rflag
1019	atf_add_test_case sflag
1020	atf_add_test_case sflag_many_files
1021	atf_add_test_case tflag
1022	atf_add_test_case tflag_alphabetic
1023	atf_add_test_case tflag_char_pos
1024	atf_add_test_case tflag_whitespace
1025	atf_add_test_case uflag
1026	atf_add_test_case uflag_rflag
1027	atf_add_test_case plus_one
1028	atf_add_test_case plus_one_minus_two
1029	atf_add_test_case plus_zero
1030	atf_add_test_case plus_nonmonotone
1031	atf_add_test_case plus_as_path
1032	atf_add_test_case plus_bad_tempfile
1033	atf_add_test_case plus_rflag_invalid
1034	atf_add_test_case plus_tflag
1035	atf_add_test_case plus_no_end
1036}
1037