aboutsummaryrefslogtreecommitdiff
path: root/posix/bug-regex29.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-08-23 15:33:40 -0700
committerUlrich Drepper <drepper@redhat.com>2009-08-23 15:33:40 -0700
commit8a7cea019947a68e641e9201813fe01ba35cfd1a (patch)
treedc8c9ef10d3fb4992d6eafde89d82dc801f4d45e /posix/bug-regex29.c
parent52db8039f54672abe6a6da5fb107fa52aca42547 (diff)
downloadglibc-8a7cea019947a68e641e9201813fe01ba35cfd1a.zip
glibc-8a7cea019947a68e641e9201813fe01ba35cfd1a.tar.gz
glibc-8a7cea019947a68e641e9201813fe01ba35cfd1a.tar.bz2
Add test case for last fixed regex bug.
Diffstat (limited to 'posix/bug-regex29.c')
-rw-r--r--posix/bug-regex29.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/posix/bug-regex29.c b/posix/bug-regex29.c
new file mode 100644
index 0000000..70a6c94
--- /dev/null
+++ b/posix/bug-regex29.c
@@ -0,0 +1,15 @@
+#include <regex.h>
+
+static int
+do_test (void)
+{
+ regex_t r;
+ int e = regcomp(&r, "xy\\{4,5,7\\}zabc", 0);
+ char buf[100];
+ regerror(e, &r, buf, sizeof (buf));
+ printf ("e = %d (%s)\n", e, buf);
+ return e != REG_BADBR;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"