diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch new file mode 100644 index 0000000000..bdfbd55899 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Withnall <pwithnall@gnome.org> | ||
3 | Date: Mon, 26 Feb 2024 16:55:44 +0000 | ||
4 | Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | PCRE2 10.43 has now introduced support for variable-length lookbehind, | ||
10 | so these tests now fail if GLib is built against PCRE2 10.43 or higher. | ||
11 | |||
12 | See | ||
13 | https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94. | ||
14 | |||
15 | Rather than making the tests conditional on the version of PCRE2 in use, | ||
16 | just remove them. They are mostly testing the PCRE2 code rather than | ||
17 | any code in GLib, so don’t have much value. | ||
18 | |||
19 | This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2 | ||
20 | days ago. | ||
21 | |||
22 | Signed-off-by: Philip Withnall <pwithnall@gnome.org> | ||
23 | |||
24 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6] | ||
25 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
26 | --- | ||
27 | glib/tests/regex.c | 10 ---------- | ||
28 | 1 file changed, 10 deletions(-) | ||
29 | |||
30 | diff --git a/glib/tests/regex.c b/glib/tests/regex.c | ||
31 | index 1082526292..d7a698ec67 100644 | ||
32 | --- a/glib/tests/regex.c | ||
33 | +++ b/glib/tests/regex.c | ||
34 | @@ -1885,16 +1885,6 @@ test_lookbehind (void) | ||
35 | g_match_info_free (match); | ||
36 | g_regex_unref (regex); | ||
37 | |||
38 | - regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); | ||
39 | - g_assert (regex == NULL); | ||
40 | - g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND); | ||
41 | - g_clear_error (&error); | ||
42 | - | ||
43 | - regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); | ||
44 | - g_assert (regex == NULL); | ||
45 | - g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND); | ||
46 | - g_clear_error (&error); | ||
47 | - | ||
48 | regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); | ||
49 | g_assert (regex); | ||
50 | g_assert_no_error (error); | ||
51 | -- | ||
52 | GitLab | ||
53 | |||
54 | |||