aboutsummaryrefslogtreecommitdiff
path: root/posix/bug-regex11.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-17 17:15:06 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-17 17:15:06 +0000
commitd4ece86585be975abe6593c470ef24e1f2f6a68f (patch)
treec7fcf2b9e90796a8c5b1f59729c2ff0df39dc9e2 /posix/bug-regex11.c
parent2430d57a13f4f10312e13c58962cd9104e6428fd (diff)
downloadglibc-d4ece86585be975abe6593c470ef24e1f2f6a68f.tar
glibc-d4ece86585be975abe6593c470ef24e1f2f6a68f.tar.gz
glibc-d4ece86585be975abe6593c470ef24e1f2f6a68f.tar.bz2
glibc-d4ece86585be975abe6593c470ef24e1f2f6a68f.zip
Add a test case for the bug reported by Paolo Bonzini <bonzini@gnu.org>.
Diffstat (limited to 'posix/bug-regex11.c')
-rw-r--r--posix/bug-regex11.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/posix/bug-regex11.c b/posix/bug-regex11.c
index d6fc4153e2..681888c8a0 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;