r47237 - in /desktop/experimental/glib2.0/debian: changelog patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch patches/series

laney at users.alioth.debian.org laney at users.alioth.debian.org
Thu Jan 14 17:44:05 UTC 2016


Author: laney
Date: Thu Jan 14 17:44:04 2016
New Revision: 47237

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=47237
Log:
0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch: Fix regex
tests to assert the right errors as of pcre 8.38. Cherry-pick from
upstream. (Closes: #808842)

Added:
    desktop/experimental/glib2.0/debian/patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch
Modified:
    desktop/experimental/glib2.0/debian/changelog
    desktop/experimental/glib2.0/debian/patches/series

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=47237&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog	[utf-8] Thu Jan 14 17:44:04 2016
@@ -5,6 +5,9 @@
   * 0001-tests-fix-a-test-on-32-bit-builds.patch,
     0001-gtypes.h-move-G_STATIC_ASSERT-to-function-scope.patch: Drop, applied
     upstream in this release.
+  * 0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch: Fix regex
+    tests to assert the right errors as of pcre 8.38. Cherry-pick from
+    upstream. (Closes: #808842)
 
  -- Iain Lane <laney at debian.org>  Thu, 14 Jan 2016 17:29:33 +0000
 

Added: desktop/experimental/glib2.0/debian/patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch?rev=47237&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch	(added)
+++ desktop/experimental/glib2.0/debian/patches/0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch	[utf-8] Thu Jan 14 17:44:04 2016
@@ -0,0 +1,44 @@
+From 855594c4de5acaea53bb413c6302d19ff7befd17 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Wed, 23 Dec 2015 15:03:16 +0000
+Subject: [PATCH] regex test: expect ASSERTION_EXPECTED for /(?(?<ab))/ with
+ PCRE 8.38
+
+PCRE 8.38 changed the parsing of this invalid regex. It still fails,
+but with a different error (since PCRE r1539,
+<http://vcs.pcre.org/pcre?view=revision&revision=1539>).
+
+The regex /(?P<sub>foo)\g<sub/ used to raise MISSING_BACK_REFERENCE but
+now raises MISSING_SUBPATTERN_NAME_TERMINATOR, so we can still have a
+test for the latter.
+
+Signed-off-by: Simon McVittie <smcv at debian.org>
+Reviewed-by: Emmanuele Bassi <ebassi at gnome.org>
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=759808
+Applied-Upstream: 2.47.5
+---
+ glib/tests/regex.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/glib/tests/regex.c b/glib/tests/regex.c
+index 09083a3..777616a 100644
+--- a/glib/tests/regex.c
++++ b/glib/tests/regex.c
+@@ -2261,7 +2261,14 @@ main (int argc, char *argv[])
+   TEST_NEW_FAIL ("^(?(0)f|b)oo", 0, G_REGEX_ERROR_INVALID_CONDITION);
+   TEST_NEW_FAIL ("(?<=\\C)X", 0, G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND);
+   TEST_NEW_FAIL ("(?!\\w)(?R)", 0, G_REGEX_ERROR_INFINITE_LOOP);
++#if PCRE_MAJOR > 8 || (PCRE_MAJOR == 8 && PCRE_MINOR >= 38)
++  /* The expected errors changed here. */
++  TEST_NEW_FAIL ("(?P<sub>foo)\\g<sub", 0, G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR);
++  TEST_NEW_FAIL ("(?(?<ab))", 0, G_REGEX_ERROR_ASSERTION_EXPECTED);
++#else
++  TEST_NEW_FAIL ("(?P<sub>foo)\\g<sub", 0, G_REGEX_ERROR_MISSING_BACK_REFERENCE);
+   TEST_NEW_FAIL ("(?(?<ab))", 0, G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR);
++#endif
+   TEST_NEW_FAIL ("(?P<x>eks)(?P<x>eccs)", 0, G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME);
+ #if 0
+   TEST_NEW_FAIL (?, 0, G_REGEX_ERROR_MALFORMED_PROPERTY);
+-- 
+2.7.0.rc3
+

Modified: desktop/experimental/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/series?rev=47237&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/series	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/series	[utf-8] Thu Jan 14 17:44:04 2016
@@ -12,3 +12,4 @@
 0001-timer-test-use-volatile-for-locals.patch
 skip-broken-timer-test.patch
 0001-Fix-trashing-on-overlayfs.patch
+0001-regex-test-expect-ASSERTION_EXPECTED-for-ab-with-PCR.patch




More information about the pkg-gnome-commits mailing list