[glib/wip/pwithnall/962-drop-embedded-pcre: 1/5] tests: Tweak whether a PCRE test is enabled




commit 1891165e735068849f609f51fa57423b3bfd698c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Jun 9 12:28:07 2021 +0100

    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 <pwithnall endlessos org>
    
    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<G>.)c", "xabcy", "X\\g<G>X", 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");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]