diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-02-10 14:48:33 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-02-10 14:48:33 -0800 |
| commit | 59ace284f33fe9928fcdb04b02044c921fd6905e (patch) | |
| tree | 53840b244e5edc39b90e347ff8c48e6254a0e4b6 /t/helper/test-pcre2-config.c | |
| parent | 0199c68d010b613bde2575cd54d8c3597431fc81 (diff) | |
| parent | 95ca1f987edd23389e3079d0a7fe6d0f89927b68 (diff) | |
| download | git-59ace284f33fe9928fcdb04b02044c921fd6905e.tar.gz | |
Merge branch 'ab/grep-pcre-invalid-utf8'
Update support for invalid UTF-8 in PCRE2.
* ab/grep-pcre-invalid-utf8:
grep/pcre2: better support invalid UTF-8 haystacks
grep/pcre2 tests: don't rely on invalid UTF-8 data test
Diffstat (limited to 't/helper/test-pcre2-config.c')
| -rw-r--r-- | t/helper/test-pcre2-config.c | 12 |
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; +} |
