From 534b4760e3dce43ab71e153ba92525459e491e7c Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Tue, 4 Jan 2022 16:59:03 +0000 Subject: [PATCH] RunGrepTest: Fix tests 132 and 133 when srcdir is relative (#71) Notably, running the script directly from a build subdirectory will infer srcdir as .. if not otherwise set, but doesn't work for these. With this commit sh pcre2_grep_test.sh works as expected. --- RunGrepTest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RunGrepTest b/RunGrepTest index 9682c5f..443ed76 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -674,11 +674,11 @@ echo "---------------------------- Test 131 -----------------------------" >>tes echo "RC=$?" >>testtrygrep echo "---------------------------- Test 132 -----------------------------" >>testtrygrep -(cd $srcdir; exec 3<$srcdir/testdata/grepinput; $valgrind $vjs $pcre2grep -m1 -A3 '^match' <&3; echo '---'; head -1 <&3; exec 3<&-) >>testtrygrep 2>&1 +(cd $srcdir; exec 3>testtrygrep 2>&1 echo "RC=$?" >>testtrygrep echo "---------------------------- Test 133 -----------------------------" >>testtrygrep -(cd $srcdir; exec 3<$srcdir/testdata/grepinput; $valgrind $vjs $pcre2grep -m1 -A3 '^match' <&3; echo '---'; $valgrind $vjs $pcre2grep -m1 -A3 '^match' <&3; exec 3<&-) >>testtrygrep 2>&1 +(cd $srcdir; exec 3>testtrygrep 2>&1 echo "RC=$?" >>testtrygrep echo "---------------------------- Test 134 -----------------------------" >>testtrygrep