From 4e29e9a079a8e7a80ee78d9dc55b9ceb90f3421c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 20 Jul 2014 19:34:54 +0100 Subject: [PATCH] regex test: do not assert that system PCRE allows "(?P<1>)" Perl >= 5.18, and PCRE >= 8.34, disallow this. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=733325 Reviewed-by: Christian Persch --- glib/tests/regex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glib/tests/regex.c b/glib/tests/regex.c index 833e5850c..b886b0618 100644 --- a/glib/tests/regex.c +++ b/glib/tests/regex.c @@ -2628,8 +2628,11 @@ main (int argc, char *argv[]) TEST_EXPAND("a", "a", "\\0130", FALSE, "X"); TEST_EXPAND("a", "a", "\\\\\\0", FALSE, "\\a"); TEST_EXPAND("a(?P.)c", "xabcy", "X\\gX", FALSE, "XbX"); +#ifndef USE_SYSTEM_PCRE + /* PCRE >= 8.34 no longer allows this usage. */ TEST_EXPAND("(.)(?P<1>.)", "ab", "\\1", FALSE, "a"); TEST_EXPAND("(.)(?P<1>.)", "ab", "\\g<1>", FALSE, "a"); +#endif TEST_EXPAND(".", EURO, "\\0", FALSE, EURO); TEST_EXPAND("(.)", EURO, "\\1", FALSE, EURO); TEST_EXPAND("(?P.)", EURO, "\\g", FALSE, EURO);