From 0448b486e9bf7816cddfd03e61ec593b192de10b Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Thu, 6 Dec 2018 17:13:41 +0000 Subject: [PATCH] Redirect stderr in RunGrepTest instead of appending to testtrygrep from two different file descriptors, because the latter doesn't always work as expected. --- ChangeLog | 4 ++++ RunGrepTest | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49139e1..3115164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -93,6 +93,10 @@ 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. +24. Some tests in RunGrepTest appended to testtrygrep from two different file +descriptors instead of redirecting stderr to stdout. This worked on Linux, but +it was reported not to on other systems, causing the tests to fail. + Version 10.32 10-September-2018 ------------------------------- diff --git a/RunGrepTest b/RunGrepTest index b950927..378bba2 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -170,11 +170,11 @@ echo "---------------------------- Test 14 -----------------------------" >>test echo "RC=$?" >>testtrygrep echo "---------------------------- Test 15 -----------------------------" >>testtrygrep -(cd $srcdir; $valgrind $vjs $pcre2grep 'abc^*' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep +(cd $srcdir; $valgrind $vjs $pcre2grep 'abc^*' ./testdata/grepinput) >>testtrygrep 2>&1 echo "RC=$?" >>testtrygrep echo "---------------------------- Test 16 -----------------------------" >>testtrygrep -(cd $srcdir; $valgrind $vjs $pcre2grep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtrygrep >>testtrygrep +(cd $srcdir; $valgrind $vjs $pcre2grep abc ./testdata/grepinput ./testdata/nonexistfile) >>testtrygrep 2>&1 echo "RC=$?" >>testtrygrep echo "---------------------------- Test 17 -----------------------------" >>testtrygrep @@ -296,7 +296,7 @@ echo "---------------------------- Test 45 ------------------------------" >>tes echo "RC=$?" >>testtrygrep echo "---------------------------- Test 46 ------------------------------" >>testtrygrep -(cd $srcdir; $valgrind $vjs $pcre2grep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtrygrep >>testtrygrep +(cd $srcdir; $valgrind $vjs $pcre2grep -eabc -e '(unclosed' ./testdata/grepinput) >>testtrygrep 2>&1 echo "RC=$?" >>testtrygrep echo "---------------------------- Test 47 ------------------------------" >>testtrygrep