tests: use a explicit filehandle to share in testing -m
The way stdin is shared to all participants of a subshell varies per shell, and at least the standard /bin/sh in Solaris seem to create a new copy for each command, defeating the purpose of the test. Use instead exec to create a filehandle that could then be used explicitly in the test to confirm that the stream is set.
This commit is contained in:
parent
072717a61f
commit
242d267641
|
@ -674,7 +674,7 @@ echo "---------------------------- Test 131 -----------------------------" >>tes
|
|||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 132 -----------------------------" >>testtrygrep
|
||||
(cd $srcdir; $valgrind $vjs $pcre2grep -m1 -A3 '^match'; echo '---'; head -1) <$srcdir/testdata/grepinput >>testtrygrep 2>&1
|
||||
(cd $srcdir; exec 3<$srcdir/testdata/grepinput; $valgrind $vjs $pcre2grep -m1 -A3 '^match' <&3; echo '---'; head -1 <&3; exec 3<&-) >>testtrygrep 2>&1
|
||||
echo "RC=$?" >>testtrygrep
|
||||
|
||||
echo "---------------------------- Test 133 -----------------------------" >>testtrygrep
|
||||
|
|
Loading…
Reference in New Issue