From 5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 8 Jun 2017 15:39:03 -0400 Subject: Prepare for radical source tree reorganization. All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control). --- posix/bug-regex24.c | 60 ----------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 posix/bug-regex24.c (limited to 'posix/bug-regex24.c') diff --git a/posix/bug-regex24.c b/posix/bug-regex24.c deleted file mode 100644 index 97c5c3508a..0000000000 --- a/posix/bug-regex24.c +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include - -#define str "civic" - -#define N 10 -static const char *expected[N] = - { - str, "c", "i", "", "", "", "", "", "", "" - }; - -static int -do_test (void) -{ - regex_t rbuf; - static const char pat[] = "\ -^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$"; - - int err = regcomp (&rbuf, pat, REG_EXTENDED); - if (err != 0) - { - char errstr[300]; - regerror (err, &rbuf, errstr, sizeof (errstr)); - puts (errstr); - return err; - } - - regmatch_t m[N]; - err = regexec (&rbuf, str, N, m, 0); - if (err != 0) - { - puts ("regexec failed"); - return 1; - } - - int result = 0; - for (int i = 0; i < N; ++i) - if (m[i].rm_so == -1) - { - printf ("m[%d] unused\n", i); - result = 1; - } - else - { - int len = m[i].rm_eo - m[i].rm_so; - - printf ("m[%d] = \"%.*s\"\n", i, len, str + m[i].rm_so); - - if (strlen (expected[i]) != len - || memcmp (expected[i], str + m[i].rm_so, len) != 0) - result = 1; - } - - return result; -} - -#define TIMEOUT 30 -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" -- cgit v1.2.3-70-g09d2