From 9a5ff3e3af6f093e533423d474919bdcc1068149 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Thu, 22 Aug 2024 17:07:34 +0100 Subject: [PATCH] Make maint/RunPerlTest public --- maint/README | 5 +++-- maint/RunPerlTest | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 maint/RunPerlTest diff --git a/maint/README b/maint/README index c054b4569..f2c06b87a 100644 --- a/maint/README +++ b/maint/README @@ -173,7 +173,8 @@ new release. the PCRE2 test output, apart from the version identification at the start of each test. Sometimes there are other differences in test 4 if PCRE2 and Perl are using different Unicode releases. The other tests are not Perl-compatible - (they use various PCRE2-specific features or options). + (they use various PCRE2-specific features or options). The maint/RunPerlTest + shell script can be used to do this testing in Unix-like environment. . It is possible to test with the emulated memmove() function by undefining HAVE_MEMMOVE and HAVE_BCOPY in config.h, though I do not do this often. @@ -452,4 +453,4 @@ years. Philip Hazel Email local part: Philip.Hazel Email domain: gmail.com -Last updated: 25 June 2024 +Last updated: 22 August 2024 diff --git a/maint/RunPerlTest b/maint/RunPerlTest new file mode 100755 index 000000000..8dcbb3326 --- /dev/null +++ b/maint/RunPerlTest @@ -0,0 +1,31 @@ +#! /bin/sh + +# Script to run the Perl-compatible PCRE2 tests through Perl. The argument can +# be "1" or "4" to run just a single test. Otherwise it runs both. This script +# should be run with the main PCRE2 directory current. + +if [ "$1" != "4" ]; then +echo "-----------------------------------------------------------------" +echo "Perl test: main functionality (PCRE2 test 1)" +./perltest.sh testdata/testinput1 testtry +if [ $? = 0 ] ; then + tail -n +3 testtry > testtry3 + diff -u testdata/testoutput1 testtry3 + /bin/rm -rf testtry3 +fi +echo "" +fi + +if [ "$1" != "1" ]; then +echo "-----------------------------------------------------------------" +echo "Perl test: UTF-8 and Unicode property features (PCRE2 test 4)" +./perltest.sh -utf8 testdata/testinput4 testtry +if [ $? = 0 ] ; then + tail -n +3 testtry > testtry3 + diff -u testdata/testoutput4 testtry3 + /bin/rm -rf testtry3 +fi +echo "" +fi + +# End