• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From df66951b96fdb800c0b6bd11292bb23fbcd6ed85 Mon Sep 17 00:00:00 2001
2From: Aleksei Rybalkin <aleksei@rybalkin.org>
3Date: Thu, 1 Sep 2022 18:19:11 +0200
4Subject: [PATCH] tests/regex: Add test for gtksourceview regression
5
6---
7 glib/tests/regex.c | 10 ++++++++++
8 1 file changed, 10 insertions(+)
9
10diff --git a/glib/tests/regex.c b/glib/tests/regex.c
11index ce946d0592..10daa7814a 100644
12--- a/glib/tests/regex.c
13+++ b/glib/tests/regex.c
14@@ -2434,6 +2434,16 @@ main (int argc, char *argv[])
15   TEST_NEW_FAIL ("\\k", 0, G_REGEX_ERROR_MISSING_NAME);
16   TEST_NEW_FAIL ("a[\\NB]c", 0, G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS);
17   TEST_NEW_FAIL ("(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEFG)XX", 0, G_REGEX_ERROR_NAME_TOO_LONG);
18+  /* See https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/278 */
19+  TEST_NEW_FAIL ("(?i-x)((?:(?i-x)[^\\x00\\t\\n\\f\\r \"'/<=>\\x{007F}-\\x{009F}" \
20+                 "\\x{FDD0}-\\x{FDEF}\\x{FFFE}\\x{FFFF}\\x{1FFFE}\\x{1FFFF}" \
21+                 "\\x{2FFFE}\\x{2FFFF}\\x{3FFFE}\\x{3FFFF}\\x{4FFFE}\\x{4FFFF}" \
22+                 "\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}" \
23+                 "\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}" \
24+                 "\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}" \
25+                 "\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)" \
26+                 "\\s*=\\s*)(\\\")",
27+                 G_REGEX_RAW, G_REGEX_ERROR_HEX_CODE_TOO_LARGE);
28
29   /* These errors can't really be tested easily:
30    * G_REGEX_ERROR_EXPRESSION_TOO_LARGE
31--
32GitLab
33
34