diff --git a/ChangeLog b/ChangeLog index e3b0a4e..c7f1e54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 --------------------------- diff --git a/RunTest b/RunTest index 6715d15..61ae8fd 100755 --- a/RunTest +++ b/RunTest @@ -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 diff --git a/RunTest.bat b/RunTest.bat index 9474434..791f265 100644 --- a/RunTest.bat +++ b/RunTest.bat @@ -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 diff --git a/testdata/testinput2 b/testdata/testinput2 index 14ad824..3f9dd6d 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -5850,7 +5850,7 @@ a)"xI /^\w+/tables=3 École -#loadtables ./testdata/testbtables +#loadtables ./testbtables /^\w+/tables=3 École diff --git a/testdata/testoutput2 b/testdata/testoutput2 index d0592d3..dc17011 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -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