summaryrefslogtreecommitdiff
path: root/t/helper/test-pcre2-config.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-pcre2-config.c')
-rw-r--r--t/helper/test-pcre2-config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/helper/test-pcre2-config.c b/t/helper/test-pcre2-config.c
new file mode 100644
index 0000000000..5258fdddba
--- /dev/null
+++ b/t/helper/test-pcre2-config.c
@@ -0,0 +1,12 @@
+#include "test-tool.h"
+#include "cache.h"
+#include "grep.h"
+
+int cmd__pcre2_config(int argc, const char **argv)
+{
+ if (argc == 2 && !strcmp(argv[1], "has-PCRE2_MATCH_INVALID_UTF")) {
+ int value = PCRE2_MATCH_INVALID_UTF;
+ return !value;
+ }
+ return 1;
+}