new file mode 100644
@@ -0,0 +1,174 @@
+# This set of tests checks local-specific features, using the "fr_FR" locale.
+# It is almost Perl-compatible. When run via RunTest, the locale is edited to
+# be whichever of "fr_FR", "french", or "fr" is found to exist. There is
+# different version of this file called wintestinput3 for use on Windows,
+# where the locale is called "french" and the tests are run using
+# RunTest.bat.
+
+#forbid_utf
+
+/^[\w]+/
+\= Expect no match
+ École
+No match
+
+/^[\w]+/locale=fr_FR
+ École
+No match
+
+/^[\W]+/
+ École
+ 0: \xc9
+
+/^[\W]+/locale=fr_FR
+\= Expect no match
+ École
+ 0: \xc9
+
+/[\b]/
+ \b
+ 0: \x08
+\= Expect no match
+ a
+No match
+
+/[\b]/locale=fr_FR
+ \b
+ 0: \x08
+\= Expect no match
+ a
+No match
+
+/^\w+/
+\= Expect no match
+ École
+No match
+
+/^\w+/locale=fr_FR
+ École
+No match
+
+/(.+)\b(.+)/
+ École
+ 0: \xc9cole
+ 1: \xc9
+ 2: cole
+
+/(.+)\b(.+)/locale=fr_FR
+\= Expect no match
+ École
+ 0: \xc9cole
+ 1: \xc9
+ 2: cole
+
+/École/i
+ École
+ 0: \xc9cole
+\= Expect no match
+ école
+No match
+
+/École/i,locale=fr_FR
+ École
+ 0: \xc9cole
+ école
+No match
+
+/\w/I
+Capture group count = 0
+Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
+ Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
+Subject length lower bound = 1
+
+/\w/I,locale=fr_FR
+Capture group count = 0
+Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
+ Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
+Subject length lower bound = 1
+
+# All remaining tests are in the fr_FR locale, so set the default.
+
+#pattern locale=fr_FR
+
+/^[\xc8-\xc9]/i
+ École
+ 0: \xc9
+ école
+No match
+
+/^[\xc8-\xc9]/
+ École
+ 0: \xc9
+\= Expect no match
+ école
+No match
+
+/\xb5/i
+ µ
+ 0: \xb5
+\= Expect no match
+ \x9c
+No match
+
+/ÿ/i
+ \xff
+ 0: \xff
+\= Expect no match
+ y
+No match
+
+/(.)\1/i
+ \xfe\xde
+No match
+
+/\W+/
+ >>>\xaa<<<
+ 0: >>>\xaa<<<
+ >>>\xba<<<
+ 0: >>>\xba<<<
+
+/[\W]+/
+ >>>\xaa<<<
+ 0: >>>\xaa<<<
+ >>>\xba<<<
+ 0: >>>\xba<<<
+
+/[^[:alpha:]]+/
+ >>>\xaa<<<
+ 0: >>>\xaa<<<
+ >>>\xba<<<
+ 0: >>>\xba<<<
+
+/\w+/
+ >>>\xaa<<<
+No match
+ >>>\xba<<<
+No match
+
+/[\w]+/
+ >>>\xaa<<<
+No match
+ >>>\xba<<<
+No match
+
+/[[:alpha:]]+/
+ >>>\xaa<<<
+No match
+ >>>\xba<<<
+No match
+
+/[[:alpha:]][[:lower:]][[:upper:]]/IB
+------------------------------------------------------------------
+ Bra
+ [A-Za-z]
+ [a-z]
+ [A-Z]
+ Ket
+ End
+------------------------------------------------------------------
+Capture group count = 0
+Starting code units: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+ a b c d e f g h i j k l m n o p q r s t u v w x y z
+Subject length lower bound = 3
+
+# End of testinput3
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.md;md5=6720bf3bcff57543b915c2b22e526df0 \
SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2 \
file://run-ptest \
+ file://testoutput3C \
"
GITHUB_BASE_URI = "https://github.com/PCRE2Project/pcre2/releases"
@@ -63,6 +64,7 @@ BBCLASSEXTEND = "native nativesdk"
do_install_ptest() {
t=${D}${PTEST_PATH}
cp -r ${S}/testdata $t
+ cp ${UNPACKDIR}/testoutput3C $t/testdata/testoutput3C
for i in pcre2posix_test pcre2grep pcre2test; do
"${B}/libtool" --mode=install install "${B}/$i" "$t"
Test 3 (locale-specific features) fails because testoutput3C is missing from the PCRE2 10.48 release tarball. It exists on upstream main branch and will be in the next release. This carries it until OE bumps to that version. On systems where glibc fr_FR locale does not classify extended Latin-1 bytes (0xC9, 0xE9, 0xAA, 0xBA) as alphabetic, none of the existing expected outputs (3, 3A, 3B) match, causing Test 3 to fail. testoutput3C was generated on the target by running: ./RunTest 3 cp testoutput8/testoutput3 testdata/testoutput3C The file is installed into the ptest testdata directory at package time, following the same pattern as the existing run-ptest file. Signed-off-by: Bhavikkumar Girishbhai Ronvelia <BhavikkumarGirishbhai.Ronvelia@windriver.com> --- .../libpcre/libpcre2/testoutput3C | 174 ++++++++++++++++++ .../recipes-support/libpcre/libpcre2_10.48.bb | 2 + 2 files changed, 176 insertions(+) create mode 100644 meta/recipes-support/libpcre/libpcre2/testoutput3C