From 72716c1f212630c313d91e3cca68da791ac64560 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Fri, 18 Aug 2017 15:21:08 +0000 Subject: [PATCH] Fudge binary zero pcre2grep test for Darwin, similar to SunOS. --- RunGrepTest | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RunGrepTest b/RunGrepTest index a72bf45..cf88c78 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -678,10 +678,11 @@ $valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgr # It seems inpossible to handle NUL characters easily in Solaris (aka SunOS). # The version of sed explicitly doesn't like them. For the moment, we just # don't run this test under SunOS. Fudge the output so that the comparison -# works. +# works. A similar problem has also been reported for MacOS (Darwin). printf "%c--------------------------- Test N7 ------------------------------\r\n" - >>testtrygrep -if [ `uname` != "SunOS" ] ; then +uname=`uname` +if [ "$uname" != "SunOS" -a "$uname" != "Darwin" ] ; then printf "abc\0def" >testNinputgrep $valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | sed 's/\x00/ZERO/' >>testtrygrep echo "" >>testtrygrep