summaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-08-23 15:33:40 -0700
committerPetr Baudis <pasky@suse.cz>2009-09-18 17:41:08 +0200
commitc4ae002d9d590d24cda7bb3cd4e1a80e2227aca1 (patch)
treea6b1c4dfde33bc6408b8793f7caabf7b3d23fae1 /posix
parent03cb6a1e3939a039bcd53bf862fa93f487e35488 (diff)
Add test case for last fixed regex bug.
(cherry picked from commit 8a7cea019947a68e641e9201813fe01ba35cfd1a)
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile1
-rw-r--r--posix/bug-regex29.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/posix/Makefile b/posix/Makefile
index d9a1ac768f..5eb8ae2279 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -82,6 +82,7 @@ tests := tstgetopt testfnm runtests runptests \
bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
+ bug-regex29 \
tst-nice tst-nanosleep tst-regex2 \
transbug tst-rxspencer tst-pcre tst-boost \
bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
diff --git a/posix/bug-regex29.c b/posix/bug-regex29.c
new file mode 100644
index 0000000000..70a6c94cc6
--- /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"