Skip to content

Commit

Permalink
Make maint/RunPerlTest public
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHazel committed Aug 22, 2024
1 parent f4681e7 commit 9a5ff3e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions maint/README
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
31 changes: 31 additions & 0 deletions maint/RunPerlTest
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9a5ff3e

Please sign in to comment.