Make scripts Solaris-compatible.

This commit is contained in:
ph10 2014-10-16 16:22:44 +00:00
parent 3b77d7f329
commit 21f1ffffa9
2 changed files with 7 additions and 3 deletions

View File

@ -121,8 +121,10 @@ fi
# $1 the value of $? after a call to pcre2test # $1 the value of $? after a call to pcre2test
# $2 the suffix of the output file to compare with # $2 the suffix of the output file to compare with
# $3 the $opt value (empty, -jit, or -dfa) # $3 the $opt value (empty, -jit, or -dfa)
#
# Note: must define using name(), not "function name", for Solaris.
function checkresult() checkresult()
{ {
if [ $1 -ne 0 ] ; then if [ $1 -ne 0 ] ; then
echo "** pcre2test failed - check testtry" echo "** pcre2test failed - check testtry"

View File

@ -80,9 +80,11 @@ fi
# This function runs a single test with the set of configuration options that # This function runs a single test with the set of configuration options that
# are in $opts. The source directory must be set in srcdir. # are in $opts. The source directory must be set in srcdir. The function must
# be defined as "runtest()" not "function runtest()" in order to run on
# Solaris.
function runtest() runtest()
{ {
rm -f $srcdir/pcre2test $srcdir/pcre2grep $srcdir/pcre2_jit_test rm -f $srcdir/pcre2test $srcdir/pcre2grep $srcdir/pcre2_jit_test
testcount=`expr $testcount + 1` testcount=`expr $testcount + 1`