[Pcre-svn] [1289] code/trunk: Update RunGrepTest to use tr f…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1289] code/trunk: Update RunGrepTest to use tr for handling binary zeros instead of sed, which it
Revision: 1289
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1289
Author:   ph10
Date:     2021-01-04 17:17:48 +0000 (Mon, 04 Jan 2021)
Log Message:
-----------
Update RunGrepTest to use tr for handling binary zeros instead of sed, which it 
is hoped with increase portability. Bugzilla #2681.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/RunGrepTest
    code/trunk/testdata/grepoutputN


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-12-04 14:31:05 UTC (rev 1288)
+++ code/trunk/ChangeLog    2021-01-04 17:17:48 UTC (rev 1289)
@@ -1,9 +1,18 @@
 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
Makefile.am and configure.ac by H.J. Lu. Equivalent patch for CMakeLists.txt

Modified: code/trunk/RunGrepTest
===================================================================
--- code/trunk/RunGrepTest    2020-12-04 14:31:05 UTC (rev 1288)
+++ code/trunk/RunGrepTest    2021-01-04 17:17:48 UTC (rev 1289)
@@ -763,14 +763,9 @@
 # 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

Modified: code/trunk/testdata/grepoutputN
===================================================================
--- code/trunk/testdata/grepoutputN    2020-12-04 14:31:05 UTC (rev 1288)
+++ code/trunk/testdata/grepoutputN    2021-01-04 17:17:48 UTC (rev 1289)
@@ -25,4 +25,4 @@
 3:ghi
 4:jkl
 ---------------------------- Test N7 ------------------------------
-1:abcZERO2:defZERO
+1:abc@2:def@