diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-19 00:25:46 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-19 00:35:29 -0800 |
commit | 641643e609c7cd4fd2898b3423d3c7ad3106f2e4 (patch) | |
tree | 46b8debf06089d0d5c0251d6bf51100db15b87d1 /tests | |
parent | 1569ee170b8eb3e5a03ca3d7d53e71fd05fd08e5 (diff) | |
download | grep-641643e609c7cd4fd2898b3423d3c7ad3106f2e4.tar.gz |
grep: -Pz no longer rejects ^, $
Problem reported by Stephane Chazelas (Bug#22655).
* NEWS: Document this.
* doc/grep.texi (grep Programs): Warn about -Pz.
* src/pcresearch.c (reflags): New static var.
(multibyte_locale): Remove static var; now local to Pcompile.
(Pcompile): Check for (? and (* too. Set reflags instead of
dying when problematic operators are found.
(Pexecute): Use reflags to decide whether searches should
be multiline.
* tests/pcre: Test new behavior.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/pcre | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -13,8 +13,9 @@ require_pcre_ fail=0 echo | grep -P '\s*$' || fail=1 -echo | returns_ 2 grep -zP '\s$' || fail=1 +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 Exit $fail |