summaryrefslogtreecommitdiff
path: root/tests/pcre
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-11-19 03:12:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-11-19 03:14:18 -0800
commit6a3f4e447af3698b1e26337211a587ff54aab99d (patch)
treed18ad8f097ca67a99c5c954f592e975e782fca69 /tests/pcre
parent575bdb1bc65d0aa73df127ec1bf70ab6ec3db174 (diff)
downloadgrep-6a3f4e447af3698b1e26337211a587ff54aab99d.tar.gz
grep: fix -zxP bug
* NEWS: Document this. * src/pcresearch.c (Pcompile): Search a line at a time if -x is used, since -x uses ^ and $. * tests/pcre: Test this.
Diffstat (limited to 'tests/pcre')
-rwxr-xr-xtests/pcre1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/pcre b/tests/pcre
index 653ef221..a290099a 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -17,5 +17,6 @@ echo | grep -zP '\s$' || fail=1
echo '.ab' | returns_ 1 grep -Pwx ab || fail=1
echo x | grep -Pz '[^a]' || fail=1
printf 'x\n\0' | returns_ 1 grep -zP 'x$' || fail=1
+printf 'a\nb\0' | grep -zxP a && fail=1
Exit $fail