[glib/wip/pcre-update: 2/8] regex test: do not assert that system PCRE allows "(?P<1>)"
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pcre-update: 2/8] regex test: do not assert that system PCRE allows "(?P<1>)"
- Date: Sun, 23 Nov 2014 18:47:56 +0000 (UTC)
commit 6cc831a1f940d1f22c547f252c3e12609d7698bd
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Sun Jul 20 19:34:54 2014 +0100
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
glib/tests/regex.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/regex.c b/glib/tests/regex.c
index 833e585..b886b06 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<G>.)c", "xabcy", "X\\g<G>X", 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<G>.)", EURO, "\\g<G>", FALSE, EURO);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]