Fix bug in RunTest: not reporting failure in test 2, and fix bugs in RunTest

and RunTest.bat causing test 2 to fail when not building in source directory.
This commit is contained in:
Philip.Hazel 2020-11-22 15:16:05 +00:00
parent d19789c251
commit 9e15c97b6d
5 changed files with 19 additions and 5 deletions

View File

@ -94,6 +94,13 @@ any Linux version will work.
19. Fix ARM64 compilation warning in JIT. Patch by Carlo.
20. A bug in the RunTest script meant that if the first part of test 2 failed,
the failure was not reported.
21. Test 2 was failing when run from a directory other than the source
directory. This failure was previously missed in RunTest because of 20 above.
Fixes added to both RunTest and RunTest.bat.
Version 10.35 09-May-2020
---------------------------

11
RunTest
View File

@ -493,15 +493,20 @@ for bmode in "$test8" "$test16" "$test32"; do
done
fi
# PCRE2 tests that are not Perl-compatible: API, errors, internals
# PCRE2 tests that are not Perl-compatible: API, errors, internals. We copy
# the testbtables file to the current directory for use by this test.
if [ $do2 = yes ] ; then
echo $title2 "(excluding UTF-$bits)"
cp $testdata/testbtables .
for opt in "" $jitopt; do
$sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput2 testtry
if [ $? = 0 ] ; then
saverc=$?
if [ $saverc = 0 ] ; then
$sim $valgrind ${opt:+$vjs} ./pcre2test -q $bmode $opt -error -70,-62,-2,-1,0,100,101,191,200 >>testtry
checkresult $? 2 "$opt"
else
checkresult $saverc 2 "$opt"
fi
done
fi
@ -859,6 +864,6 @@ for bmode in "$test8" "$test16" "$test32"; do
done
# Clean up local working files
rm -f testSinput test3input testsaved1 testsaved2 test3output test3outputA test3outputB teststdout teststderr testtry
rm -f testbtables testSinput test3input testsaved1 testsaved2 test3output test3outputA test3outputB teststdout teststderr testtry
# End

View File

@ -26,6 +26,7 @@
@rem Updated for new test 14 (moving others up a number), August 2015.
@rem Tidied and updated for new tests 21, 22, 23 by PH, October 2015.
@rem PH added missing "set type" for test 22, April 2016.
@rem PH added copy command for new testbtables file, November 2020
setlocal enabledelayedexpansion
@ -305,6 +306,7 @@ if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -jit
goto :eof
:do2
copy /y %srcdir%\testdata\testbtables testbtables
call :runsub 2 testout "API, errors, internals, and non-Perl stuff" -q
if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -jit
goto :eof

2
testdata/testinput2 vendored
View File

@ -5850,7 +5850,7 @@ a)"xI
/^\w+/tables=3
École
#loadtables ./testdata/testbtables
#loadtables ./testbtables
/^\w+/tables=3
École

View File

@ -17597,7 +17597,7 @@ No match
** 'Tables = 3' is invalid: binary tables have not been loaded
École
#loadtables ./testdata/testbtables
#loadtables ./testbtables
/^\w+/tables=3
École