diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-13 21:28:54 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-13 21:28:54 (GMT) |
commit | b3f04e5b4c7e04d70e4cef74b4848dd198653cbb (patch) | |
tree | 651a7cca05c68f898937bdd017988d91ab4aa75a /t | |
parent | 6c3daa23461333c508c41faa532c6fb749cd0db0 (diff) | |
parent | a25b9085043b8029169b4d5b172b78ca3f38fb37 (diff) | |
download | git-b3f04e5b4c7e04d70e4cef74b4848dd198653cbb.zip git-b3f04e5b4c7e04d70e4cef74b4848dd198653cbb.tar.gz git-b3f04e5b4c7e04d70e4cef74b4848dd198653cbb.tar.bz2 |
Merge branch 'ab/pcre2-grep'
"git grep" compiled with libpcre2 sometimes triggered a segfault,
which is being fixed.
* ab/pcre2-grep:
grep: fix segfault under -P + PCRE2 <=10.30 + (*NO_JIT)
test-lib: add LIBPCRE1 & LIBPCRE2 prerequisites
Diffstat (limited to 't')
-rw-r--r-- | t/README | 12 | ||||
-rwxr-xr-x | t/t7810-grep.sh | 6 | ||||
-rw-r--r-- | t/test-lib.sh | 2 |
3 files changed, 20 insertions, 0 deletions
@@ -808,6 +808,18 @@ use these, and "test_set_prereq" for how to define your own. Git was compiled with support for PCRE. Wrap any tests that use git-grep --perl-regexp or git-grep -P in these. + - LIBPCRE1 + + Git was compiled with PCRE v1 support via + USE_LIBPCRE1=YesPlease. Wrap any PCRE using tests that for some + reason need v1 of the PCRE library instead of v2 in these. + + - LIBPCRE2 + + Git was compiled with PCRE v2 support via + USE_LIBPCRE2=YesPlease. Wrap any PCRE using tests that for some + reason need v2 of the PCRE library instead of v1 in these. + - CASE_INSENSITIVE_FS Test is run on a case insensitive file system. diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index c02ca73..1797f63 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -1131,6 +1131,12 @@ test_expect_success PCRE 'grep -P pattern' ' test_cmp expected actual ' +test_expect_success LIBPCRE2 "grep -P with (*NO_JIT) doesn't error out" ' + git grep -P "(*NO_JIT)\p{Ps}.*?\p{Pe}" hello.c >actual && + test_cmp expected actual + +' + test_expect_success !PCRE 'grep -P pattern errors without PCRE' ' test_must_fail git grep -P "foo.*bar" ' diff --git a/t/test-lib.sh b/t/test-lib.sh index 116bd6a..e7065df 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1028,6 +1028,8 @@ test -z "$NO_PERL" && test_set_prereq PERL test -z "$NO_PTHREADS" && test_set_prereq PTHREADS test -z "$NO_PYTHON" && test_set_prereq PYTHON test -n "$USE_LIBPCRE1$USE_LIBPCRE2" && test_set_prereq PCRE +test -n "$USE_LIBPCRE1" && test_set_prereq LIBPCRE1 +test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT # Can we rely on git's output in the C locale? |