Cut out test of NUL characters in RunGrepTest for all OS except Linux, as it
doesn't work for *BSD as well as for Solaris and MacOS (which were already cut out).
This commit is contained in:
parent
e7a762ddff
commit
8f1727af98
|
@ -88,6 +88,11 @@ via a string callout.
|
||||||
22. If a pattern started with (*MARK), (*COMMIT), (*PRUNE), (*SKIP), or (*THEN)
|
22. If a pattern started with (*MARK), (*COMMIT), (*PRUNE), (*SKIP), or (*THEN)
|
||||||
followed by ^ it was not recognized as anchored.
|
followed by ^ it was not recognized as anchored.
|
||||||
|
|
||||||
|
23. The RunGrepTest script used to cut out the test of NUL characters for
|
||||||
|
Solaris and MacOS as printf and sed can't handle them. It seems that the *BSD
|
||||||
|
systems can't either. I've inverted the test so that only those OS that are
|
||||||
|
known to work (currently only Linux) try to run this test.
|
||||||
|
|
||||||
|
|
||||||
Version 10.32 10-September-2018
|
Version 10.32 10-September-2018
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
26
RunGrepTest
26
RunGrepTest
|
@ -714,20 +714,24 @@ $valgrind $vjs $pcre2grep -n --newline=any "^(abc|def|ghi|jkl)" testNinputgrep >
|
||||||
printf '%c--------------------------- Test N6 ------------------------------\r\n' - >>testtrygrep
|
printf '%c--------------------------- Test N6 ------------------------------\r\n' - >>testtrygrep
|
||||||
$valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
$valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
|
||||||
|
|
||||||
# It seems impossible to handle NUL characters easily in Solaris (aka SunOS).
|
# It seems impossible to handle NUL characters easily in many operating
|
||||||
# The version of sed explicitly doesn't like them. For the moment, we just
|
# systems, including Solaris (aka SunOS), where the version of sed explicitly
|
||||||
# don't run this test under SunOS. Fudge the output so that the comparison
|
# doesn't like them, and also MacOS (Darwin), OpenBSD, FreeBSD, and NetBSD. So
|
||||||
# works. A similar problem has also been reported for MacOS (Darwin).
|
# now we run this test only on OS that are known to work. For the rest, we
|
||||||
|
# fudge the output so that the comparison works.
|
||||||
|
|
||||||
printf '%c--------------------------- Test N7 ------------------------------\r\n' - >>testtrygrep
|
printf '%c--------------------------- Test N7 ------------------------------\r\n' - >>testtrygrep
|
||||||
uname=`uname`
|
uname=`uname`
|
||||||
if [ "$uname" != "SunOS" -a "$uname" != "Darwin" ] ; then
|
case $uname in
|
||||||
printf 'abc\0def' >testNinputgrep
|
Linux)
|
||||||
$valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | sed 's/\x00/ZERO/' >>testtrygrep
|
printf 'abc\0def' >testNinputgrep
|
||||||
echo "" >>testtrygrep
|
$valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | sed 's/\x00/ZERO/' >>testtrygrep
|
||||||
else
|
echo "" >>testtrygrep
|
||||||
echo '1:abcZERO2:def' >>testtrygrep
|
;;
|
||||||
fi
|
*)
|
||||||
|
echo '1:abcZERO2:def' >>testtrygrep
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
$cf $srcdir/testdata/grepoutputN testtrygrep
|
$cf $srcdir/testdata/grepoutputN testtrygrep
|
||||||
if [ $? != 0 ] ; then exit 1; fi
|
if [ $? != 0 ] ; then exit 1; fi
|
||||||
|
|
Loading…
Reference in New Issue