about summary refs log tree commit diff
path: root/posix/bug-regex31.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2010-10-11 12:34:53 -0400
committerUlrich Drepper <drepper@gmail.com>2010-10-11 12:34:53 -0400
commitef06edbee6463061a7f3dcbd2f56a625b41a4810 (patch)
tree88f21fb5581bef4906d31c491add0f05861a579c /posix/bug-regex31.c
parenta129c80d54ec951567caa8c1b042275422d5f367 (diff)
downloadglibc-ef06edbee6463061a7f3dcbd2f56a625b41a4810.tar.gz
glibc-ef06edbee6463061a7f3dcbd2f56a625b41a4810.tar.xz
glibc-ef06edbee6463061a7f3dcbd2f56a625b41a4810.zip
Test case for last regex problem.
Diffstat (limited to 'posix/bug-regex31.c')
-rw-r--r--posix/bug-regex31.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/posix/bug-regex31.c b/posix/bug-regex31.c
new file mode 100644
index 0000000000..2d5d6695d4
--- /dev/null
+++ b/posix/bug-regex31.c
@@ -0,0 +1,16 @@
+#include <mcheck.h>
+#include <regex.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+int main()
+{
+ regex_t regex;
+ int rc;
+
+  mtrace ();
+
+ if ((rc = regcomp (&regex, "([0]", REG_EXTENDED)))
+   printf ("Error %d (expected)\n", rc);
+ return 0;
+}