mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
regex test: do not assert that system PCRE still has an 8.31 bug
This was fixed in 8.32, so if we have that version, assert that it is fixed; if we don't (e.g. the current internal pcre), still don't assert that it *isn't* fixed. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=733325 Reviewed-by: Christian Persch <chpe@gnome.org> Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
fe1a2dc196
commit
ace7846322
@ -25,6 +25,12 @@
|
||||
#include <locale.h>
|
||||
#include "glib.h"
|
||||
|
||||
#ifdef USE_SYSTEM_PCRE
|
||||
#include <pcre.h>
|
||||
#else
|
||||
#include "glib/pcre/pcre.h"
|
||||
#endif
|
||||
|
||||
/* U+20AC EURO SIGN (symbol, currency) */
|
||||
#define EURO "\xe2\x82\xac"
|
||||
/* U+00E0 LATIN SMALL LETTER A WITH GRAVE (letter, lowercase) */
|
||||
@ -2446,8 +2452,12 @@ main (int argc, char *argv[])
|
||||
/* Test that othercasing in our pcre/glib integration is bug-for-bug compatible
|
||||
* with pcre's internal tables. Bug #678273 */
|
||||
TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "DŽ", -1, 0, 0, TRUE);
|
||||
TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "Dž", -1, 0, 0, FALSE);
|
||||
TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "dž", -1, 0, 0, TRUE);
|
||||
#if PCRE_MAJOR > 8 || (PCRE_MAJOR == 8 && PCRE_MINOR >= 32)
|
||||
/* This would incorrectly fail to match in pcre < 8.32, so only assert
|
||||
* this for known-good pcre. */
|
||||
TEST_MATCH("[DŽ]", G_REGEX_CASELESS, 0, "Dž", -1, 0, 0, TRUE);
|
||||
#endif
|
||||
|
||||
/* TEST_MATCH_NEXT#(pattern, string, string_len, start_position, ...) */
|
||||
TEST_MATCH_NEXT0("a", "x", -1, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user