Update RunGrepTest to use tr for handling binary zeros instead of sed, which it

is hoped with increase portability. Bugzilla #2681.
This commit is contained in:
Philip.Hazel 2021-01-04 17:17:48 +00:00
parent 7eb23f423e
commit 027c9375c0
3 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,17 @@
Change Log for PCRE2
--------------------
Version 10.36-RC1 04-December-2020
----------------------------------
Version 10.37-RC1 04-January-2021
---------------------------------
1. Change RunGrepTest to use tr instead of sed when testing with binary
zero bytes, because sed varies a lot from system to system and has problems
with binary zeros. This is from Bugzilla #2681. Patch from Jeremie
Courreges-Anglas via Nam Nguyen. This fixes RunGrepTest for OpenBSD.
Version 10.36 04-December-2020
------------------------------
1. Add CET_CFLAGS so that when Intel CET is enabled, pass -mshstk to
compiler. This fixes https://bugs.exim.org/show_bug.cgi?id=2578. Patch for

View File

@ -763,14 +763,9 @@ $valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgr
# doesn't.
printf '%c--------------------------- Test N7 ------------------------------\r\n' - >>testtrygrep
Z=`printf '\0' | sed 's/\x00/Z/g'`
if [ "$Z" = "Z" ]; then
printf 'abc\0def' >testNinputgrep
$valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | sed 's/\x00/ZERO/g' >>testtrygrep
echo "" >>testtrygrep
else
echo '1:abcZERO2:defZERO' >>testtrygrep
fi
printf 'abc\0def' >testNinputgrep
$valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | tr '\000' '@' >>testtrygrep
echo "" >>testtrygrep
$cf $srcdir/testdata/grepoutputN testtrygrep
if [ $? != 0 ] ; then exit 1; fi

View File

@ -18,4 +18,4 @@ jkl
3:ghi
4:jkl
---------------------------- Test N7 ------------------------------
1:abcZERO2:defZERO
1:abc@2:def@