Package: glib2.0 / 2.42.1-1

regex-test-do-not-assert-that-system-PCRE-still-has-.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 593b7d5f100e4893b8b958f8ca0dc84c7a08d579 Mon Sep 17 00:00:00 2001
From: Simon McVittie <simon.mcvittie@collabora.co.uk>
Date: Sun, 20 Jul 2014 19:33:59 +0100
Subject: [PATCH 2/4] regex test: do not assert that system PCRE still has an
 8.31 bug

This was fixed in 8.32.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=733325
---
 glib/tests/regex.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/glib/tests/regex.c
+++ b/glib/tests/regex.c
@@ -2387,8 +2387,12 @@
   /* Test that othercasing in our pcre/glib integration is bug-for-bug compatible
    * with pcre's internal tables. Bug #678273 */
   TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "DŽ", -1, 0, 0, TRUE);
-  TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "Dž", -1, 0, 0, FALSE);
   TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "dž", -1, 0, 0, TRUE);
+#ifndef USE_SYSTEM_PCRE
+  /* This is a bug, which was fixed in 8.32. A system pcre might
+   * be that version or newer, so we cannot assert that it has this bug. */
+  TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "Dž", -1, 0, 0, FALSE);
+#endif
 
   /* TEST_MATCH_NEXT#(pattern, string, string_len, start_position, ...) */
   TEST_MATCH_NEXT0("a", "x", -1, 0);