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 28atf_test_case basic 29basic_head() 30{ 31 atf_set "descr" "Basic functionality test" 32} 33basic_body() 34{ 35 cat >in <<EOF 36z b m f 37y c o e 38x a n h 39x a n g 40EOF 41 42 cat >expout <<EOF 43x a n g 44x a n h 45y c o e 46z b m f 47EOF 48 49 atf_check -o file:expout sort in 50} 51 52atf_test_case empty_file 53empty_file_head() 54{ 55 atf_set "descr" "Tests sorting an empty file" 56} 57empty_file_body() 58{ 59 touch empty 60 atf_check -o empty sort -S empty 61 atf_check sort -S -c empty 62 atf_check sort -S -c -u empty 63} 64 65atf_test_case end_of_options 66end_of_options_head() 67{ 68 atf_set "descr" "Determination of end of option list" 69} 70end_of_options_body() 71{ 72 echo x >-k 73 atf_check -o file:-k -x "sort -S -- -k </dev/null" 74 atf_check -s not-exit:1 -e ignore -x "sort -S - -c </dev/null" 75} 76 77atf_test_case missing_newline 78missing_newline_head() 79{ 80 atf_set "descr" "Tests with missing new line in input file" 81} 82missing_newline_body() 83{ 84 printf '%s' x >in 85 atf_check -o inline:'x\n' sort in 86} 87 88atf_test_case null_bytes 89null_bytes_head() 90{ 91 atf_set "descr" "Tests the behavior of null bytes" 92} 93null_bytes_body() 94{ 95 printf '\0b\n\0a\n' >in 96 atf_check -o inline:'\0a\n\0b\n' sort -S in 97} 98 99atf_test_case long_records 100long_records_head() 101{ 102 atf_set "descr" "Tests long lines and keys" 103} 104long_records_body() 105{ 106 awk 'BEGIN { x="x" 107 for(i=1; i<=12; i++) x = x x 108 for(i=15; i<=25; i++) print x i 109}' >in 110 111 awk 'BEGIN { x="x" 112 for(i=1; i<=12; i++) x = x x 113 for(i=25; i>=15; i--) print x i 114}' >out 115 116 atf_check -o file:out sort -r in 117 atf_check -o file:out sort -k 1,1r -k 1 in 118} 119 120atf_test_case long_file 121long_file_head() 122{ 123 atf_set "descr" "Tests with a long file to try to force intermediate" \ 124 "files" 125} 126long_file_body() 127{ 128 awk 'BEGIN { for(i=0; i<20000; i++) print rand() }' >in 129 sort -S -r in | awk '$0 "x" != x { print ; x = $0 "x" }' >out 130 atf_check -o file:out sort -u -r in 131} 132 133atf_test_case any_char 134any_char_head() 135{ 136 atf_set "descr" "Tests with files containing non-printable/extended" \ 137 "characters" 138} 139any_char_body() 140{ 141 atf_check -o file:$(atf_get_srcdir)/d_any_char_dflag_out.txt \ 142 sort -d -k 2 $(atf_get_srcdir)/d_any_char_in.txt 143 144 atf_check -o file:$(atf_get_srcdir)/d_any_char_fflag_out.txt \ 145 sort -f -k 2 $(atf_get_srcdir)/d_any_char_in.txt 146 147 atf_check -o file:$(atf_get_srcdir)/d_any_char_iflag_out.txt \ 148 sort -i -k 2 $(atf_get_srcdir)/d_any_char_in.txt 149} 150 151atf_test_case bflag 152bflag_head() 153{ 154 atf_set "descr" "Tests the -b flag" 155} 156bflag_body() 157{ 158 cat >in <<EOF 159 b 160 a 161EOF 162 163 atf_check -o file:in sort -b in 164 atf_check -o file:in -x "sort -b <in" 165 atf_check -s exit:1 -o ignore -e ignore -x "sort in | sort -c -r" 166} 167 168atf_test_case cflag 169cflag_head() 170{ 171 atf_set "descr" "Tests the -c flag" 172} 173cflag_body() 174{ 175 cat >in <<EOF 176b 177a 178EOF 179 180 atf_check -s exit:1 -e ignore sort -S -c in 181} 182 183atf_test_case kflag_one_field 184kflag_one_field_head() 185{ 186 atf_set "descr" "Tests the -k flag with one field" 187} 188kflag_one_field_body() 189{ 190 cat >in <<EOF 191z b m f 192y c o e 193x a n h 194x a n g 195EOF 196 197 cat >expout <<EOF 198x a n g 199x a n h 200z b m f 201y c o e 202EOF 203 204 atf_check -o file:expout sort -k2.1 in 205} 206 207atf_test_case kflag_two_fields 208kflag_two_fields_head() 209{ 210 atf_set "descr" "Tests the -k flag with two fields" 211} 212kflag_two_fields_body() 213{ 214 cat >in <<EOF 215z b m f 216y c o e 217x a n h 218x a n g 219EOF 220 221 cat >expout <<EOF 222x a n h 223x a n g 224z b m f 225y c o e 226EOF 227 atf_check -o file:expout sort -k2.1,2.0 in 228} 229 230atf_test_case kflag_many_fields 231kflag_many_fields_head() 232{ 233 atf_set "descr" "Tests the -k flag with many fields" 234} 235kflag_many_fields_body() 236{ 237 cat >in <<EOF 2380:2:3:4:5:6:7:8:9 2391:1:3:4:5:6:7:8:9 2401:2:2:4:5:6:7:8:9 2411:2:3:3:5:6:7:8:9 2421:2:3:4:4:6:7:8:9 2431:2:3:4:5:5:7:8:9 2441:2:3:4:5:6:6:8:9 2451:2:3:4:5:6:7:7:9 2461:2:3:4:5:6:7:8:8 247EOF 248 249 cat >out <<EOF 2501:2:3:4:5:6:7:8:8 2511:2:3:4:5:6:7:7:9 2521:2:3:4:5:6:6:8:9 2531:2:3:4:5:5:7:8:9 2541:2:3:4:4:6:7:8:9 2551:2:3:3:5:6:7:8:9 2561:2:2:4:5:6:7:8:9 2571:1:3:4:5:6:7:8:9 2580:2:3:4:5:6:7:8:9 259EOF 260 261 atf_check -o file:out sort -t: -k9 -k8 -k7 -k6 -k5 -k4 -k3 \ 262 -k2 -k1 in 263} 264 265atf_test_case kflag_outofbounds 266kflag_outofbounds_head() 267{ 268 atf_set "descr" "Tests the -k flag with out of bounds fields" 269} 270kflag_outofbounds_body() 271{ 272 cat >in <<EOF 2730 5 2741 4 2752 3 2763 2 2774 1 2785 0 279EOF 280 281 atf_check -o file:in sort -k2.2,2.1 -k2.3,2.4 in 282} 283 284atf_test_case kflag_nonmonotone 285kflag_nonmonotone_head() 286{ 287 atf_set "descr" "Tests the -k flag with apparently nonmonotone" \ 288 "field specs" 289} 290kflag_nonmonotone_body() 291{ 292 cat >in <<EOF 293aaaa c 294x a 2950 b 296EOF 297 298 atf_check -o file:in sort -k2,1.3 -k2.5,2.5 in 299} 300 301atf_test_case kflag_limits 302kflag_limits_head() 303{ 304 atf_set "descr" "Tests the -k flag field limits" 305} 306kflag_limits_body() 307{ 308 cat >in <<EOF 309a 2 310a 1 311b 2 312b 1 313EOF 314 315 cat >out <<EOF 316b 2 317b 1 318a 2 319a 1 320EOF 321 322 atf_check -o file:out sort -r -k1,1 -k2n in 323} 324 325atf_test_case kflag_alpha 326kflag_alpha_head() 327{ 328 atf_set "descr" "Tests the -k flag with various alpha fields" 329} 330kflag_alpha_body() 331{ 332 sort >in <<EOF 33301:04:19:01:16:01:21:01 a 33402:03:13:15:13:19:15:02 a 33503:02:07:09:07:13:09:03 a 33604:01:01:03:01:07:03:04 a 33705:08:20:16:17:02:20:05 aa 33806:07:14:18:14:20:14:06 aa 33907:06:08:10:08:14:08:07 aa 34008:05:02:04:02:08:02:08 aa 34109:16:22:02:22:04:24:13 b 34210:15:16:20:19:22:18:14 b 34311:14:10:12:10:16:12:15 b 34412:13:04:06:04:10:06:16 b 34513:24:24:22:24:06:22:21 bb 34614:23:18:24:21:24:16:22 bb 34715:22:12:14:12:18:10:23 bb 34816:21:06:08:06:12:04:24 bb 34917:12:21:21:18:03:19:09 ab 35018:11:15:19:15:21:13:10 ab 35119:10:09:11:09:15:07:11 ab 35220:09:03:05:03:09:01:12 ab 35321:20:23:17:23:05:23:17 ba 35422:19:17:23:20:23:17:18 ba 35523:18:11:13:11:17:11:19 ba 35624:17:05:07:05:11:05:20 ba 357EOF 358 359 atf_check -x "sort -S -k2b -k2 in >xx" 360 atf_check -e ignore sort -c -t: -k2n xx 361 362 atf_check -x "sort -S -k2,2.1b -k2 in >xx" 363 atf_check -e ignore sort -c -t: -k3n xx 364 365 atf_check -x "sort -S -k2.3 -k2 in >xx" 366 atf_check -e ignore sort -c -t: -k4n xx 367 368 atf_check -x "sort -S -k2b,2.3 -k2 in >xx" 369 atf_check -e ignore sort -c -t: -k5n xx 370 371 atf_check -x "sort -S -k2.3,2.1b -k2 in >xx" 372 atf_check -e ignore sort -c -t: -k6n xx 373 374 atf_check -x "sort -S -k2,2.1b -k2r in >xx" 375 atf_check -e ignore sort -c -t: -k7n xx 376 377 atf_check -x "sort -S -b -k2,2 -k2 in >xx" 378 atf_check -e ignore sort -c -t: -k8n xx 379 380 # XXX This test is broken. The standard is not clear on the behavior. 381 #atf_check -x "sort -S -b -k2,2b -k2 in >xx" 382 #atf_check -e ignore sort -c -t: -k3n xx 383} 384 385atf_test_case kflag_no_end 386kflag_no_end_head() 387{ 388 atf_set "descr" "Tests the -k flag with a field without end" 389} 390kflag_no_end_body() 391{ 392 cat >in <<EOF 393a-B 394a+b 395a b 396A+b 397a b 398EOF 399 400 cat >out <<EOF 401a b 402a b 403A+b 404a-B 405a+b 406EOF 407 408 atf_check -o file:out sort -df -k 1 -k 1d <in 409} 410 411atf_test_case mflag 412mflag_head() 413{ 414 atf_set "descr" "Tests the -m flag" 415} 416mflag_body() 417{ 418 cat >in1 <<EOF 419a 420ab 421ab 422bc 423ca 424EOF 425 cat >in2 <<EOF 426Z 427a 428aa 429ac 430c 431EOF 432 cat >out <<EOF 433Z 434a 435a 436aa 437ab 438ab 439ac 440bc 441c 442ca 443EOF 444 445 atf_check -o file:out sort -S -m in1 in2 446} 447 448atf_test_case mflag_uflag 449mflag_uflag_head() 450{ 451 atf_set "descr" "Tests the -m flag together with -u" 452} 453mflag_uflag_body() 454{ 455 cat >in <<EOF 456a 457b 458c 459d 460EOF 461 462 atf_check -o file:in sort -m -u in 463} 464 465atf_test_case mflag_uflag_first 466mflag_uflag_first_head() 467{ 468 atf_set "descr" "Tests that the -m flag together with -u picks the" \ 469 "first among equal" 470} 471mflag_uflag_first_body() 472{ 473 cat >in <<EOF 4743B 4753b 4763B2 477~3B2 4784.1 47941 4805 4815. 482EOF 483 484 cat >out <<EOF 4853B 4863B2 4874.1 4885 489EOF 490 491 atf_check -o file:out sort -mudf in 492 atf_check -o file:out sort -mudf -k1 in 493} 494 495atf_test_case nflag 496nflag_head() 497{ 498 atf_set "descr" "Tests the -n flag" 499} 500nflag_body() 501{ 502 cat >in <<EOF 503-99.0 504-99.1 505-.0002 506-10 5072 5080010.000000000000000000000000000000000001 50910 5103x 511x 512EOF 513 514 cat >expout <<EOF 515-99.1 516-99.0 517-10 518-.0002 519x 5202 5213x 52210 5230010.000000000000000000000000000000000001 524EOF 525 526 atf_check -o file:expout sort -n in 527} 528 529atf_test_case nflag_rflag 530nflag_rflag_head() 531{ 532 atf_set "descr" "Tests the -n and -r flag combination" 533} 534nflag_rflag_body() 535{ 536 cat >in <<EOF 5371 538123 5392 540EOF 541 542 cat >expout <<EOF 543123 5442 5451 546EOF 547 548 atf_check -o file:expout sort -rn in 549} 550 551atf_test_case oflag 552oflag_head() 553{ 554 atf_set "descr" "Tests the -o flag" 555} 556oflag_body() 557{ 558 cat >in <<EOF 5591 5601 5612 5622 5633 5643 5654 5664 567EOF 568 569 atf_check sort -u -o in in 570 571 cat >expout <<EOF 5721 5732 5743 5754 576EOF 577 578 atf_check -o file:expout cat in 579} 580 581atf_test_case oflag_displaced 582oflag_displaced_head() 583{ 584 atf_set "descr" "Tests the -o flag after the file names" 585} 586oflag_displaced_body() 587{ 588 atf_check sort -S /dev/null -o out 589 test -f out || atf_fail "File not created" 590} 591 592atf_test_case rflag 593rflag_head() 594{ 595 atf_set "descr" "Tests the -r flag" 596} 597rflag_body() 598{ 599 cat >in <<EOF 600z b m f 601y c o e 602x a n h 603x a n g 604EOF 605 606 cat >expout <<EOF 607z b m f 608y c o e 609x a n h 610x a n g 611EOF 612 613 atf_check -o file:expout sort -r in 614} 615 616atf_test_case sflag 617sflag_head() 618{ 619 atf_set "descr" "Tests the -s flag" 620} 621sflag_body() 622{ 623 cat >in <<EOF 624a 2 625b 1 626c 2 627a 1 628b 2 629c 1 630EOF 631 632 cat >out <<EOF 633a 2 634a 1 635b 1 636b 2 637c 2 638c 1 639EOF 640 641 atf_check -o file:out sort -s -k1,1 in 642} 643 644atf_test_case sflag_many_files 645sflag_many_files_head() 646{ 647 atf_set "descr" "Tests the -s flag with multiple files" 648} 649sflag_many_files_body() 650{ 651 cat >in1 <<EOF 652c 2 653a 2 654EOF 655 656 cat >in2 <<EOF 657c 1 658b 1 659a 1 660EOF 661 662 cat >out <<EOF 663c 2 664b 1 665a 2 666EOF 667 668 atf_check -o file:out sort -smru -k1,1 in1 in1 in2 in2 669} 670 671atf_test_case tflag 672tflag_head() 673{ 674 atf_set "descr" "Tests the -t flag" 675} 676tflag_body() 677{ 678 cat >in <<EOF 679a: 680a! 681EOF 682 683 atf_check -o file:in sort -t : -r +0 in 684 atf_check -o file:in sort -t : +0 -1 in 685 atf_check -o file:in sort -t : -r -k 1 in 686 atf_check -o file:in sort -t : -k 1,1 in 687} 688 689atf_test_case tflag_alphabetic 690tflag_alphabetic_head() 691{ 692 atf_set "descr" "Tests the -t flag with a character as the delimiter" 693} 694tflag_alphabetic_body() 695{ 696 cat >in <<EOF 697zXa 698yXa 699zXb 700EOF 701 702 atf_check -o file:in sort -tX -k2 -k1r,1 in 703} 704 705atf_test_case tflag_char_pos 706tflag_char_pos_head() 707{ 708 atf_set "descr" "Tests the -t flag with character positions in fields" 709} 710tflag_char_pos_body() 711{ 712 cat >in <<EOF 713: ab 714:bac 715EOF 716 717 cat >out <<EOF 718:bac 719: ab 720EOF 721 722 atf_check -o file:out sort -b -t: +1.1 in 723 atf_check -o file:out sort -t: +1.1r in 724 atf_check -o file:out sort -b -t: -k 2.2 in 725 atf_check -o file:out sort -t: -k 2.2r in 726} 727 728atf_test_case tflag_whitespace 729tflag_whitespace_head() 730{ 731 atf_set "descr" "Tests the -t flag with spaces and tabs as the" \ 732 "delimiter" 733} 734tflag_whitespace_body() 735{ 736 cat >in <<EOF 737 b c 738 b c 739 b c 740EOF 741 742 atf_check -o file:in sort -t ' ' -k2,2 in 743 atf_check -o file:in sort -t ' ' -k2.1,2.0 in 744 745 cat >out <<EOF 746 b c 747 b c 748 b c 749EOF 750 751 atf_check -o file:out sort -t ' ' -k2,2 in 752 atf_check -o file:out sort -t ' ' -k2.1,2.0 in 753 754 cat >out <<EOF 755 b c 756 b c 757 b c 758EOF 759 760 atf_check -o file:out sort -S -k2 in 761 762 cat >out <<EOF 763 b c 764 b c 765 b c 766EOF 767 768 atf_check -o file:out sort -S -k2b in 769} 770 771atf_test_case uflag 772uflag_head() 773{ 774 atf_set "descr" "Tests the -u flag" 775} 776uflag_body() 777{ 778 cat >in <<EOF 779a 780aa 781aaa 782aa 783EOF 784 785 cat >expout <<EOF 786a 787aa 788aaa 789EOF 790 791 atf_check -o file:expout sort -u in 792} 793 794atf_test_case uflag_rflag 795uflag_rflag_head() 796{ 797 atf_set "descr" "Tests the -u and -r flag combination" 798} 799uflag_rflag_body() 800{ 801 cat >in <<EOF 802a 803aa 804aaa 805aa 806EOF 807 808 cat >expout <<EOF 809aaa 810aa 811a 812EOF 813 814 atf_check -o file:expout sort -ru in 815} 816 817atf_test_case plus_one 818plus_one_head() 819{ 820 atf_set "descr" "Tests +- addressing: +1 should become -k2.1" 821} 822plus_one_body() 823{ 824 cat >in <<EOF 825z b m f 826y c o e 827x a n h 828x a n g 829EOF 830 831 cat >expout <<EOF 832x a n g 833x a n h 834z b m f 835y c o e 836EOF 837 838 atf_check -o file:expout sort +1 in 839} 840 841atf_test_case plus_one_minus_two 842plus_one_minus_two_head() 843{ 844 atf_set "descr" "Tests +- addressing: +1 -2 should become -k2.1,2.0" 845} 846plus_one_minus_two_body() 847{ 848 cat >in <<EOF 849z b m f 850y c o e 851x a n h 852x a n g 853EOF 854 855 cat >expout <<EOF 856x a n h 857x a n g 858z b m f 859y c o e 860EOF 861 862 atf_check -o file:expout sort +1 -2 in 863} 864 865atf_test_case plus_zero 866plus_zero_head() 867{ 868 atf_set "descr" "Tests +- addressing: '-- +0' raised a '-k1.1: No" \ 869 "such file or directory' error" 870} 871plus_zero_body() 872{ 873 echo 'good contents' >./+0 874 875 atf_check -o file:+0 sort -- +0 876} 877 878atf_test_case plus_nonmonotone 879plus_nonmonotone_head() 880{ 881 atf_set "descr" "Tests += addressing: apparently nonmonotone field" \ 882 "specs" 883} 884plus_nonmonotone_body() 885{ 886 cat >in <<EOF 887aaaa c 888x a 8890 b 890EOF 891 892 atf_check -o file:in sort +1 -0.3 +1.4 -1.5 in 893} 894 895atf_test_case plus_as_path 896plus_as_path_head() 897{ 898 atf_set "descr" "Tests +- addressing: 'file +0' raised a '-k1.1: No" \ 899 "such file or directory' error" 900} 901plus_as_path_body() 902{ 903 echo 'good contents' >./+0 904 echo 'more contents' >in 905 cat ./+0 in >expout 906 907 atf_check -o file:expout sort in +0 908} 909 910atf_test_case plus_bad_tempfile 911plus_bad_tempfile_head() 912{ 913 atf_set "descr" "Tests +- addressing: intermediate wrong behavior" \ 914 "that raised a '+0: No such file or directory' error" 915} 916plus_bad_tempfile_body() 917{ 918 echo 'good contents' >in 919 atf_check -o file:in sort -T /tmp +0 in 920} 921 922atf_test_case plus_rflag_invalid 923plus_rflag_invalid_head() 924{ 925 atf_set "descr" "Tests +- addressing: invalid record delimiter" 926} 927plus_rflag_invalid_body() 928{ 929 ( 930 echo 'z b m f' 931 echo 'y c o e' 932 echo 'x a n h' 933 echo 'x a n g' 934 ) | tr '\n' '+' >in 935 936 atf_check -o inline:'x a n g+x a n h+z b m f+y c o e+' \ 937 sort -R + -k2 in 938} 939 940atf_test_case plus_tflag 941plus_tflag_head() 942{ 943 atf_set "descr" "Tests +- addressing: using -T caused a 'No such file" \ 944 "or directory' error" 945} 946plus_tflag_body() 947{ 948 mkdir ./+ 949 yes | sed 200000q | sort -T + >/dev/null || atf_fail "program failed" 950} 951 952atf_test_case plus_no_end 953plus_no_end_head() 954{ 955 atf_set "descr" "Tests +- addressing: field without end" 956} 957plus_no_end_body() 958{ 959 cat >in <<EOF 960a-B 961a+b 962a b 963A+b 964a b 965EOF 966 967 cat >out <<EOF 968a b 969a b 970A+b 971a-B 972a+b 973EOF 974 975 atf_check -o file:out sort -df +0 +0d in 976} 977 978atf_init_test_cases() 979{ 980 atf_add_test_case basic 981 atf_add_test_case empty_file 982 atf_add_test_case end_of_options 983 atf_add_test_case missing_newline 984 atf_add_test_case null_bytes 985 atf_add_test_case long_records 986 atf_add_test_case long_file 987 atf_add_test_case any_char 988 atf_add_test_case bflag 989 atf_add_test_case cflag 990 atf_add_test_case kflag_one_field 991 atf_add_test_case kflag_two_fields 992 atf_add_test_case kflag_many_fields 993 atf_add_test_case kflag_outofbounds 994 atf_add_test_case kflag_nonmonotone 995 atf_add_test_case kflag_limits 996 atf_add_test_case kflag_alpha 997 atf_add_test_case kflag_no_end 998 atf_add_test_case mflag 999 atf_add_test_case mflag_uflag 1000 atf_add_test_case mflag_uflag_first 1001 atf_add_test_case nflag 1002 atf_add_test_case nflag_rflag 1003 atf_add_test_case oflag 1004 atf_add_test_case oflag_displaced 1005 atf_add_test_case rflag 1006 atf_add_test_case sflag 1007 atf_add_test_case sflag_many_files 1008 atf_add_test_case tflag 1009 atf_add_test_case tflag_alphabetic 1010 atf_add_test_case tflag_char_pos 1011 atf_add_test_case tflag_whitespace 1012 atf_add_test_case uflag 1013 atf_add_test_case uflag_rflag 1014 atf_add_test_case plus_one 1015 atf_add_test_case plus_one_minus_two 1016 atf_add_test_case plus_zero 1017 atf_add_test_case plus_nonmonotone 1018 atf_add_test_case plus_as_path 1019 atf_add_test_case plus_bad_tempfile 1020 atf_add_test_case plus_rflag_invalid 1021 atf_add_test_case plus_tflag 1022 atf_add_test_case plus_no_end 1023} 1024