test: avoid failing RunTest if pcre2test -S is not supported

If `pcre2test -S` is not supported then then avoid checking for it
in a test.

There is already a conditional check for it to be used when it is
needed and it is available, so adjust that as well.
This commit is contained in:
Carlo Marcelo Arenas Belón 2021-11-05 01:20:20 -07:00
parent 072717a61f
commit 564ef321ee
1 changed files with 5 additions and 2 deletions

View File

@ -320,7 +320,8 @@ fi
# set up a large stack.
$sim ./pcre2test -S 64 /dev/null /dev/null
if [ $? -eq 0 -a "$bigstack" != "" ] ; then
support_setstack=$?
if [ $support_setstack -eq 0 -a "$bigstack" != "" ] ; then
setstack="-S 64"
else
setstack=""
@ -479,7 +480,9 @@ for bmode in "$test8" "$test16" "$test32"; do
echo '' >testtry
checkspecial '-C'
checkspecial '--help'
checkspecial '-S 1 -t 10 testSinput'
if [ $support_setstack -eq 0 ] ; then
checkspecial '-S 1 -t 10 testSinput'
fi
echo " OK"
fi