From 99ef2719fb3d703fe38c4113cd7f5adec516dd3a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 28 Oct 2016 20:29:21 +0200 Subject: test: remove test suite The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step. --- test/unistd/tstgetopt.c | 76 ------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 test/unistd/tstgetopt.c (limited to 'test/unistd/tstgetopt.c') diff --git a/test/unistd/tstgetopt.c b/test/unistd/tstgetopt.c deleted file mode 100644 index 1c1263e67..000000000 --- a/test/unistd/tstgetopt.c +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include -#include - -int -main (int argc, char **argv) -{ - static const struct option options[] = - { - {"required", required_argument, NULL, 'r'}, - {"optional", optional_argument, NULL, 'o'}, - {"none", no_argument, NULL, 'n'}, - {"color", no_argument, NULL, 'C'}, - {"colour", no_argument, NULL, 'C'}, - {NULL, 0, NULL, 0 } - }; - - int aflag = 0; - int bflag = 0; - char *cvalue = NULL; - int Cflag = 0; - int nflag = 0; - int idx; - int c; - int result = 0; - - while ((c = getopt_long (argc, argv, "abc:", options, NULL)) >= 0) - switch (c) - { - case 'a': - aflag = 1; - break; - case 'b': - bflag = 1; - break; - case 'c': - cvalue = optarg; - break; - case 'C': - ++Cflag; - break; - case '?': - fputs ("Unknown option.\n", stderr); - return 1; - default: - fprintf (stderr, "This should never happen!\n"); - return 1; - - case 'r': - printf ("--required %s\n", optarg); - result |= strcmp (optarg, "foobar") != 0; - break; - case 'o': - printf ("--optional %s\n", optarg); - result |= optarg == NULL || strcmp (optarg, "bazbug") != 0; - break; - case 'n': - puts ("--none"); - nflag = 1; - break; - } - - printf ("aflag = %d, bflag = %d, cvalue = %s, Cflags = %d, nflag = %d\n", - aflag, bflag, cvalue, Cflag, nflag); - - result |= (aflag != 1 || bflag != 1 || cvalue == NULL - || strcmp (cvalue, "foobar") != 0 || Cflag != 3 || nflag != 1); - - for (idx = optind; idx < argc; idx++) - printf ("Non-option argument %s\n", argv[idx]); - - result |= optind + 1 != argc || strcmp (argv[optind], "random") != 0; - - return result; -} -- cgit v1.2.3