summaryrefslogtreecommitdiff
path: root/t/t7810-grep.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-13 21:28:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-13 21:28:54 (GMT)
commitb3f04e5b4c7e04d70e4cef74b4848dd198653cbb (patch)
tree651a7cca05c68f898937bdd017988d91ab4aa75a /t/t7810-grep.sh
parent6c3daa23461333c508c41faa532c6fb749cd0db0 (diff)
parenta25b9085043b8029169b4d5b172b78ca3f38fb37 (diff)
downloadgit-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/t7810-grep.sh')
-rwxr-xr-xt/t7810-grep.sh6
1 files changed, 6 insertions, 0 deletions
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"
'