diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2021-01-04 17:17:48 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2021-01-04 17:17:48 +0000 |
commit | 4050676ed976646234e66c536f086056fe7274cb (patch) | |
tree | 9770313d557f8c34a4274dd8687247d0f49544eb | |
parent | d1aeeb6d38f3fe8c94515f4cfc29016db366cb04 (diff) | |
download | pcre2-4050676ed976646234e66c536f086056fe7274cb.tar.gz |
Update RunGrepTest to use tr for handling binary zeros instead of sed, which it
is hoped with increase portability. Bugzilla #2681.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1289 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r-- | ChangeLog | 13 | ||||
-rwxr-xr-x | RunGrepTest | 11 | ||||
-rw-r--r-- | testdata/grepoutputN | 2 |
3 files changed, 15 insertions, 11 deletions
@@ -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 diff --git a/RunGrepTest b/RunGrepTest index 4d514e4..1e319c9 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -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 diff --git a/testdata/grepoutputN b/testdata/grepoutputN index caaeb75..811c52d 100644 --- a/testdata/grepoutputN +++ b/testdata/grepoutputN @@ -18,4 +18,4 @@ jkl 3:ghi 4:jkl ---------------------------- Test N7 ------------------------------
-1:abcZERO2:defZERO +1:abc@2:def@ |