From 1891165e735068849f609f51fa57423b3bfd698c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 9 Jun 2021 12:28:07 +0100 Subject: [PATCH] tests: Tweak whether a PCRE test is enabled Rather than predicating the test on whether the system PCRE is being used, use a more specific version comparison which should work regardless of whether the system or internal copy of libpcre is being used. Signed-off-by: Philip Withnall Helps: #962 --- glib/tests/regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/tests/regex.c b/glib/tests/regex.c index 60ab2f9df..1a37177b3 100644 --- a/glib/tests/regex.c +++ b/glib/tests/regex.c @@ -2675,7 +2675,7 @@ main (int argc, char *argv[]) TEST_EXPAND("a", "a", "\\0130", FALSE, "X"); TEST_EXPAND("a", "a", "\\\\\\0", FALSE, "\\a"); TEST_EXPAND("a(?P.)c", "xabcy", "X\\gX", FALSE, "XbX"); -#ifndef USE_SYSTEM_PCRE +#if !(PCRE_MAJOR > 8 || (PCRE_MAJOR == 8 && PCRE_MINOR >= 34)) /* 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");