diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-11-22 15:16:05 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-11-22 15:16:05 +0000 |
commit | 2d98a50b21461b0b0e942a99cddf94945ccbecab (patch) | |
tree | 9152ec532a97085bf5ea4770f6810a8889b82b8f | |
parent | f118797e8aacefdf703c32f142ccc8e4d43c6bb5 (diff) | |
download | pcre2-2d98a50b21461b0b0e942a99cddf94945ccbecab.tar.gz |
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.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1285 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | RunTest | 11 | ||||
-rw-r--r-- | RunTest.bat | 2 | ||||
-rw-r--r-- | testdata/testinput2 | 2 | ||||
-rw-r--r-- | testdata/testoutput2 | 2 |
5 files changed, 19 insertions, 5 deletions
@@ -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 --------------------------- @@ -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 |