diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2021-06-09 12:28:07 +0100 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2021-06-09 12:29:02 +0100 |
commit | 1891165e735068849f609f51fa57423b3bfd698c (patch) | |
tree | 1e79b61d773f3953c5d04b19b79d918835e4b29a /glib/tests/regex.c | |
parent | 601ef3b6be457a6b0c15ab3a341a0e51f1d02ffd (diff) | |
download | glib-1891165e735068849f609f51fa57423b3bfd698c.tar.gz |
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
Diffstat (limited to 'glib/tests/regex.c')
-rw-r--r-- | glib/tests/regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |