$OpenBSD: patch-RunGrepTest,v 1.5 2021/01/20 01:04:22 namn Exp $

Our sed(1) doesn't cope with NUL bytes and \x00-style notation.
Use tr(1) instead.

see: https://bugs.exim.org/show_bug.cgi?id=2681

Index: RunGrepTest
--- RunGrepTest.orig
+++ RunGrepTest
@@ -763,14 +763,9 @@ $valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|
 # 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
