From: Ulrich Drepper Date: Thu, 17 Oct 2002 17:15:06 +0000 (+0000) Subject: Add a test case for the bug reported by Paolo Bonzini . X-Git-Tag: cvs/initial~223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4ece86585be975abe6593c470ef24e1f2f6a68f;p=platform%2Fupstream%2Fglibc.git Add a test case for the bug reported by Paolo Bonzini . --- diff --git a/posix/bug-regex11.c b/posix/bug-regex11.c index d6fc415..681888c 100644 --- a/posix/bug-regex11.c +++ b/posix/bug-regex11.c @@ -30,7 +30,7 @@ struct const char *pattern; const char *string; int flags, nmatch; - regmatch_t rm[4]; + regmatch_t rm[5]; } tests[] = { /* Test for newline handling in regex. */ { "[^~]*~", "\nx~y", 0, 2, { { 0, 3 }, { -1, -1 } } }, @@ -38,14 +38,17 @@ struct { ".*|\\([KIO]\\)\\([^|]*\\).*|?[KIO]", "10~.~|P|K0|I10|O16|?KSb", 0, 3, { { 0, 21 }, { 15, 16 }, { 16, 18 } } }, { ".*|\\([KIO]\\)\\([^|]*\\).*|?\\1", "10~.~|P|K0|I10|O16|?KSb", 0, 3, - { { 0, 21 }, { 8, 9 }, { 9, 10 } } } + { { 0, 21 }, { 8, 9 }, { 9, 10 } } }, + { "^\\(a*\\)\\1\\{9\\}\\(a\\{0,9\\}\\)\\([0-9]*;.*[^a]\\2\\([0-9]\\)\\)", + "a1;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9aa2aa1a0", 0, + 5, { { 0, 67 }, { 0, 0 }, { 0, 1 }, { 1, 67 }, { 66, 67 } } } }; int main (void) { regex_t re; - regmatch_t rm[4]; + regmatch_t rm[5]; size_t i; int n, ret = 0;