summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-06-19 12:38:43 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-19 12:38:43 -0700
commitae7e4d4fedc2237217a9f802eba4ded9ea66bb91 (patch)
tree6a10111b07939e0013082185ad4d5d471822bf03 /t
parentMerge branch 'jk/pathspec-magic-disambiguation' (diff)
parentgrep: add support for PCRE v2 (diff)
downloadtgif-ae7e4d4fedc2237217a9f802eba4ded9ea66bb91.tar.xz
Merge branch 'ab/pcre-v2'
Update "perl-compatible regular expression" support to enable JIT and also allow linking with the newer PCRE v2 library. * ab/pcre-v2: grep: add support for PCRE v2 grep: un-break building with PCRE >= 8.32 without --enable-jit grep: un-break building with PCRE < 8.20 grep: un-break building with PCRE < 8.32 grep: add support for the PCRE v1 JIT API log: add -P as a synonym for --perl-regexp grep: skip pthreads overhead when using one thread grep: don't redundantly compile throwaway patterns under threading
Diffstat (limited to 't')
-rwxr-xr-xt/t4202-log.sh12
-rw-r--r--t/test-lib.sh2
2 files changed, 13 insertions, 1 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 66606e7508..3f3531f0a4 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -404,8 +404,20 @@ test_expect_success 'log with various grep.patternType configurations & command-
--grep="(1|2)" >actual.fixed.short-arg &&
git log --pretty=tformat:%s -E \
--grep="\|2" >actual.extended.short-arg &&
+ if test_have_prereq PCRE
+ then
+ git log --pretty=tformat:%s -P \
+ --grep="[\d]\|" >actual.perl.short-arg
+ else
+ test_must_fail git log -P \
+ --grep="[\d]\|"
+ fi &&
test_cmp expect.fixed actual.fixed.short-arg &&
test_cmp expect.extended actual.extended.short-arg &&
+ if test_have_prereq PCRE
+ then
+ test_cmp expect.perl actual.perl.short-arg
+ fi &&
git log --pretty=tformat:%s --fixed-strings \
--grep="(1|2)" >actual.fixed.long-arg &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 4936725c67..2306574dc9 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1020,7 +1020,7 @@ esac
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" && test_set_prereq PCRE
+test -n "$USE_LIBPCRE1$USE_LIBPCRE2" && test_set_prereq PCRE
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
# Can we rely on git's output in the C locale?