From 1f9e6eb43947c3a3c8544c3cc7c0dfb2bfec27f6 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Thu, 24 Jul 2014 18:01:11 +0000 Subject: [PATCH] Test 3 (locale test) converted. --- RunTest | 155 ++++++++++++++++++------------------ src/pcre2.h | 2 +- src/pcre2.h.in | 2 +- src/pcre2_maketables.c | 33 +++----- src/pcre2test.c | 1 + testdata/testinput3 | 100 +++++++++++++++++++++++ testdata/testoutput3 | 176 +++++++++++++++++++++++++++++++++++++++++ testdata/testoutput3A | 176 +++++++++++++++++++++++++++++++++++++++++ testdata/testoutput3B | 176 +++++++++++++++++++++++++++++++++++++++++ 9 files changed, 721 insertions(+), 100 deletions(-) create mode 100644 testdata/testinput3 create mode 100644 testdata/testoutput3 create mode 100644 testdata/testoutput3A create mode 100644 testdata/testoutput3B diff --git a/RunTest b/RunTest index c632831..e80f406 100755 --- a/RunTest +++ b/RunTest @@ -50,7 +50,7 @@ title1="Test 1: Main functionality (Compatible with Perl >= 5.10)" title2="Test 2: API, errors, internals, and non-Perl stuff" -#title3="Test 3: Locale-specific features" +title3="Test 3: Locale-specific features" #title4A="Test 4: UTF" #title4B=" support (Compatible with Perl >= 5.10)" #title5="Test 5: API, internals, and non-Perl stuff for UTF" @@ -81,7 +81,7 @@ maxtest=2 if [ $# -eq 1 -a "$1" = "list" ]; then echo $title1 echo $title2 "(not UTF)" -# echo $title3 + echo $title3 # echo $title4A $title4B # echo $title5 support # echo $title6 @@ -174,7 +174,7 @@ unset cp ls mv rm do1=no do2=no -#do3=no +do3=no #do4=no #do5=no #do6=no @@ -203,7 +203,7 @@ while [ $# -gt 0 ] ; do case $1 in 1) do1=yes;; 2) do2=yes;; -# 3) do3=yes;; + 3) do3=yes;; # 4) do4=yes;; # 5) do5=yes;; # 6) do6=yes;; @@ -346,8 +346,8 @@ fi # If no specific tests were requested, select all. Those that are not # relevant will be automatically skipped. -if [ $do1 = no -a $do2 = no ]; then -# -a $do3 = no -a $do4 = no -a \ +if [ $do1 = no -a $do2 = no -a $do3 = no ]; then +# -a $do4 = no -a \ # $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ # $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \ # $do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \ @@ -357,7 +357,7 @@ if [ $do1 = no -a $do2 = no ]; then do1=yes do2=yes -# do3=yes + do3=yes # do4=yes # do5=yes # do6=yes @@ -446,77 +446,76 @@ if [ $do2 = yes ] ; then done fi -## Locale-specific tests, provided that either the "fr_FR" or the "french" -## locale is available. The former is the Unix-like standard; the latter is -## for Windows. Another possibility is "fr". Unfortunately, different versions -## of the French locale give different outputs for some items. This test passes -## if the output matches any one of the alternative output files. -# -#if [ $do3 = yes ] ; then -# locale -a | grep '^fr_FR$' >/dev/null -# if [ $? -eq 0 ] ; then -# locale=fr_FR -# infile=$testdata/testinput3 -# outfile=$testdata/testoutput3 -# outfile2=$testdata/testoutput3A -# outfile3=$testdata/testoutput3B -# else -# infile=test3input -# outfile=test3output -# outfile2=test3outputA -# outfile3=test3outputB -# locale -a | grep '^french$' >/dev/null -# if [ $? -eq 0 ] ; then -# locale=french -# sed 's/fr_FR/french/' $testdata/testinput3 >test3input -# sed 's/fr_FR/french/' $testdata/testoutput3 >test3output -# sed 's/fr_FR/french/' $testdata/testoutput3A >test3outputA -# sed 's/fr_FR/french/' $testdata/testoutput3B >test3outputB -# else -# locale -a | grep '^fr$' >/dev/null -# if [ $? -eq 0 ] ; then -# locale=fr -# sed 's/fr_FR/fr/' $testdata/intestinput3 >test3input -# sed 's/fr_FR/fr/' $testdata/intestoutput3 >test3output -# sed 's/fr_FR/fr/' $testdata/intestoutput3A >test3outputA -# sed 's/fr_FR/fr/' $testdata/intestoutput3B >test3outputB -# else -# locale= -# fi -# fi -# fi -# -# if [ "$locale" != "" ] ; then -# echo $title3 "(using '$locale' locale)" -# for opt in "" "-s" $jitopt; do -# $sim $valgrind ./pcre2test -q $bmode $opt $infile testtry -# if [ $? = 0 ] ; then -# if $cf $outfile testtry >teststdout || \ -# $cf $outfile2 testtry >teststdout || \ -# $cf $outfile3 testtry >teststdout -# then -# if [ "$opt" = "-s" ] ; then echo " OK with study" -# elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study" -# else echo " OK" -# fi -# else -# echo "** Locale test did not run successfully. The output did not match" -# echo " $outfile, $outfile2 or $outfile3." -# echo " This may mean that there is a problem with the locale settings rather" -# echo " than a bug in PCRE." -# exit 1 -# fi -# else exit 1 -# fi -# done -# else -# echo "Cannot test locale-specific features - none of the 'fr_FR', 'fr' or" -# echo "'french' locales exist, or the \"locale\" command is not available" -# echo "to check for them." -# echo " " -# fi -#fi -# +# Locale-specific tests, provided that either the "fr_FR" or the "french" +# locale is available. The former is the Unix-like standard; the latter is +# for Windows. Another possibility is "fr". Unfortunately, different versions +# of the French locale give different outputs for some items. This test passes +# if the output matches any one of the alternative output files. + +if [ $do3 = yes ] ; then + locale -a | grep '^fr_FR$' >/dev/null + if [ $? -eq 0 ] ; then + locale=fr_FR + infile=$testdata/testinput3 + outfile=$testdata/testoutput3 + outfile2=$testdata/testoutput3A + outfile3=$testdata/testoutput3B + else + infile=test3input + outfile=test3output + outfile2=test3outputA + outfile3=test3outputB + locale -a | grep '^french$' >/dev/null + if [ $? -eq 0 ] ; then + locale=french + sed 's/fr_FR/french/' $testdata/testinput3 >test3input + sed 's/fr_FR/french/' $testdata/testoutput3 >test3output + sed 's/fr_FR/french/' $testdata/testoutput3A >test3outputA + sed 's/fr_FR/french/' $testdata/testoutput3B >test3outputB + else + locale -a | grep '^fr$' >/dev/null + if [ $? -eq 0 ] ; then + locale=fr + sed 's/fr_FR/fr/' $testdata/intestinput3 >test3input + sed 's/fr_FR/fr/' $testdata/intestoutput3 >test3output + sed 's/fr_FR/fr/' $testdata/intestoutput3A >test3outputA + sed 's/fr_FR/fr/' $testdata/intestoutput3B >test3outputB + else + locale= + fi + fi + fi + + if [ "$locale" != "" ] ; then + echo $title3 "(using '$locale' locale)" + for opt in "" $jitopt; do + $sim $valgrind ./pcre2test -q $bmode $opt $infile testtry + if [ $? = 0 ] ; then + if $cf $outfile testtry >teststdout || \ + $cf $outfile2 testtry >teststdout || \ + $cf $outfile3 testtry >teststdout + then + if [ "$opt" = "-jit" ] ; then echo " OK with JIT" + else echo " OK" + fi + else + echo "** Locale test did not run successfully. The output did not match" + echo " $outfile, $outfile2 or $outfile3." + echo " This may mean that there is a problem with the locale settings rather" + echo " than a bug in PCRE2." + exit 1 + fi + else exit 1 + fi + done + else + echo "Cannot test locale-specific features - none of the 'fr_FR', 'fr' or" + echo "'french' locales exist, or the \"locale\" command is not available" + echo "to check for them." + echo " " + fi +fi + ## Additional tests for UTF support # #if [ $do4 = yes ] ; then diff --git a/src/pcre2.h b/src/pcre2.h index 6064f3c..967e7f4 100644 --- a/src/pcre2.h +++ b/src/pcre2.h @@ -480,7 +480,7 @@ PCRE2_EXP_DECL void pcre2_jit_stack_free(pcre2_jit_stack *); #define PCRE2_OTHER_FUNCTIONS \ PCRE2_EXP_DECL int pcre2_get_error_message(int, PCRE2_UCHAR *, size_t); \ PCRE2_EXP_DECL \ - const unsigned char *pcre2_maketables(pcre2_general_context *); \ + const uint8_t *pcre2_maketables(pcre2_general_context *); \ PCRE2_EXP_DECL int pcre2_pattern_to_host_byte_order(pcre2_code *); diff --git a/src/pcre2.h.in b/src/pcre2.h.in index 8d8b9f4..24ab70e 100644 --- a/src/pcre2.h.in +++ b/src/pcre2.h.in @@ -480,7 +480,7 @@ PCRE2_EXP_DECL void pcre2_jit_stack_free(pcre2_jit_stack *); #define PCRE2_OTHER_FUNCTIONS \ PCRE2_EXP_DECL int pcre2_get_error_message(int, PCRE2_UCHAR *, size_t); \ PCRE2_EXP_DECL \ - const unsigned char *pcre2_maketables(pcre2_general_context *); \ + const uint8_t *pcre2_maketables(pcre2_general_context *); \ PCRE2_EXP_DECL int pcre2_pattern_to_host_byte_order(pcre2_code *); diff --git a/src/pcre2_maketables.c b/src/pcre2_maketables.c index 2df7819..12ad0b2 100644 --- a/src/pcre2_maketables.c +++ b/src/pcre2_maketables.c @@ -39,9 +39,9 @@ POSSIBILITY OF SUCH DAMAGE. */ -/* This module contains the external function pcre_maketables(), which builds -character tables for PCRE in the current locale. The file is compiled on its -own as part of the PCRE library. However, it is also included in the +/* This module contains the external function pcre2_maketables(), which builds +character tables for PCRE2 in the current locale. The file is compiled on its +own as part of the PCRE2 library. However, it is also included in the compilation of dftables.c, in which case the macro DFTABLES is defined. */ #ifndef DFTABLES @@ -60,31 +60,26 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */ /* This function builds a set of character tables for use by PCRE2 and returns a pointer to them. They are build using the ctype functions, and consequently their contents will depend upon the current locale setting. When compiled as -part of the library, the store is obtained via the context malloc, but when -compiled inside dftables, use malloc(). +part of the library, the store is obtained via a general context malloc, if +supplied, but otherwise via malloc(). -Arguments: a PCRE2 context (for malloc) +Arguments: a PCRE2 general context (for malloc) or NULL Returns: pointer to the contiguous block of data */ -/* FIXME: temporarily a dummy, until pcre2_internal is complete. */ - -PCRE2_EXP_DEFN const unsigned char * PCRE2_CALL_CONVENTION +PCRE2_EXP_DEFN const uint8_t * PCRE2_CALL_CONVENTION pcre2_maketables(pcre2_general_context *gcontext) { -gcontext=gcontext; -return NULL; - -#ifdef NEVER - -unsigned char *yield, *p; +uint8_t *yield, *p; int i; #ifndef DFTABLES -yield = (unsigned char*)context->malloc(tables_length); -#else -yield = (unsigned char*)malloc(tables_length); +if (gcontext != NULL) + yield = (uint8_t *)gcontext->memctl.malloc(tables_length, + gcontext->memctl.memory_data); +else #endif +yield = (uint8_t *)malloc(tables_length); if (yield == NULL) return NULL; p = yield; @@ -151,8 +146,6 @@ for (i = 0; i < 256; i++) } return yield; -#endif - } /* End of pcre2_maketables.c */ diff --git a/src/pcre2test.c b/src/pcre2test.c index ba9ce8c..e0e89a6 100644 --- a/src/pcre2test.c +++ b/src/pcre2test.c @@ -5270,6 +5270,7 @@ _setmode( _fileno( stdout ), _O_BINARY ); /* Initialization that does not depend on the running mode. */ +locale_name[0] = 0; memset(&def_patctl, 0, sizeof(patctl)); memset(&def_datctl, 0, sizeof(datctl)); def_datctl.oveccount = DEFAULT_OVECCOUNT; diff --git a/testdata/testinput3 b/testdata/testinput3 new file mode 100644 index 0000000..3010f01 --- /dev/null +++ b/testdata/testinput3 @@ -0,0 +1,100 @@ +# This set of tests checks local-specific features, using the "fr_FR" locale. +# It is not 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]+/ + *** Failers + École + +/^[\w]+/locale=fr_FR + École + +/^[\w]+/ + *** Failers + École + +/^[\W]+/ + École + +/^[\W]+/locale=fr_FR + *** Failers + École + +/[\b]/ + \b + *** Failers + a + +/[\b]/locale=fr_FR + \b + *** Failers + a + +/^\w+/ + *** Failers + École + +/^\w+/locale=fr_FR + École + +/(.+)\b(.+)/ + École + +/(.+)\b(.+)/locale=fr_FR + *** Failers + École + +/École/i + École + *** Failers + école + +/École/i,locale=fr_FR + École + école + +/\w/I + +/\w/I,locale=fr_FR + +/^[\xc8-\xc9]/i,locale=fr_FR + École + école + +/^[\xc8-\xc9]/locale=fr_FR + École + *** Failers + école + +/\W+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/[\W]+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/[^[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/\w+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/[\w]+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/[[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + >>>\xba<<< + +/[[:alpha:]][[:lower:]][[:upper:]]/IB,locale=fr_FR + +# End of testinput3 diff --git a/testdata/testoutput3 b/testdata/testoutput3 new file mode 100644 index 0000000..54fbd48 --- /dev/null +++ b/testdata/testoutput3 @@ -0,0 +1,176 @@ +# This set of tests checks local-specific features, using the "fr_FR" locale. +# It is not 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]+/ + *** Failers +No match + École +No match + +/^[\w]+/locale=fr_FR + École + 0: École + +/^[\w]+/ + *** Failers +No match + École +No match + +/^[\W]+/ + École + 0: \xc9 + +/^[\W]+/locale=fr_FR + *** Failers + 0: *** + École +No match + +/[\b]/ + \b + 0: \x08 + *** Failers +No match + a +No match + +/[\b]/locale=fr_FR + \b + 0: \x08 + *** Failers +No match + a +No match + +/^\w+/ + *** Failers +No match + École +No match + +/^\w+/locale=fr_FR + École + 0: École + +/(.+)\b(.+)/ + École + 0: \xc9cole + 1: \xc9 + 2: cole + +/(.+)\b(.+)/locale=fr_FR + *** Failers + 0: *** Failers + 1: *** + 2: Failers + École +No match + +/École/i + École + 0: \xc9cole + *** Failers +No match + école +No match + +/École/i,locale=fr_FR + École + 0: École + école + 0: école + +/\w/I +Capturing subpattern count = 0 +No options +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 +No last code unit +Subject length lower bound = 1 + +/\w/I,locale=fr_FR +Capturing subpattern count = 0 +No options +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 + ª µ º À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â + ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 1 + +/^[\xc8-\xc9]/i,locale=fr_FR + École + 0: É + école + 0: é + +/^[\xc8-\xc9]/locale=fr_FR + École + 0: É + *** Failers +No match + école +No match + +/\W+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[\W]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[^[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/\w+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[\w]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]][[:lower:]][[:upper:]]/IB,locale=fr_FR +------------------------------------------------------------------ + Bra + [A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff] + [a-z\xb5\xdf-\xf6\xf8-\xff] + [A-Z\xc0-\xd6\xd8-\xde] + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +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 ª µ º À Á Â Ã Ä Å Æ Ç + È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í + î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 3 + +# End of testinput3 diff --git a/testdata/testoutput3A b/testdata/testoutput3A new file mode 100644 index 0000000..9501b05 --- /dev/null +++ b/testdata/testoutput3A @@ -0,0 +1,176 @@ +# This set of tests checks local-specific features, using the "fr_FR" locale. +# It is not 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]+/ + *** Failers +No match + École +No match + +/^[\w]+/locale=fr_FR + École + 0: École + +/^[\w]+/ + *** Failers +No match + École +No match + +/^[\W]+/ + École + 0: \xc9 + +/^[\W]+/locale=fr_FR + *** Failers + 0: *** + École +No match + +/[\b]/ + \b + 0: \x08 + *** Failers +No match + a +No match + +/[\b]/locale=fr_FR + \b + 0: \x08 + *** Failers +No match + a +No match + +/^\w+/ + *** Failers +No match + École +No match + +/^\w+/locale=fr_FR + École + 0: École + +/(.+)\b(.+)/ + École + 0: \xc9cole + 1: \xc9 + 2: cole + +/(.+)\b(.+)/locale=fr_FR + *** Failers + 0: *** Failers + 1: *** + 2: Failers + École +No match + +/École/i + École + 0: \xc9cole + *** Failers +No match + école +No match + +/École/i,locale=fr_FR + École + 0: École + école + 0: école + +/\w/I +Capturing subpattern count = 0 +No options +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 +No last code unit +Subject length lower bound = 1 + +/\w/I,locale=fr_FR +Capturing subpattern count = 0 +No options +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 + ª µ º À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â + ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 1 + +/^[\xc8-\xc9]/i,locale=fr_FR + École + 0: É + école + 0: é + +/^[\xc8-\xc9]/locale=fr_FR + École + 0: É + *** Failers +No match + école +No match + +/\W+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[\W]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[^[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/\w+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[\w]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]][[:lower:]][[:upper:]]/IB,locale=fr_FR +------------------------------------------------------------------ + Bra + [A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff] + [a-z\xaa\xb5\xba\xdf-\xf6\xf8-\xff] + [A-Z\xc0-\xd6\xd8-\xde] + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +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 ª µ º À Á Â Ã Ä Å Æ Ç + È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í + î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 3 + +# End of testinput3 diff --git a/testdata/testoutput3B b/testdata/testoutput3B new file mode 100644 index 0000000..3b0b603 --- /dev/null +++ b/testdata/testoutput3B @@ -0,0 +1,176 @@ +# This set of tests checks local-specific features, using the "fr_FR" locale. +# It is not 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]+/ + *** Failers +No match + École +No match + +/^[\w]+/locale=fr_FR + École + 0: École + +/^[\w]+/ + *** Failers +No match + École +No match + +/^[\W]+/ + École + 0: \xc9 + +/^[\W]+/locale=fr_FR + *** Failers + 0: *** + École +No match + +/[\b]/ + \b + 0: \x08 + *** Failers +No match + a +No match + +/[\b]/locale=fr_FR + \b + 0: \x08 + *** Failers +No match + a +No match + +/^\w+/ + *** Failers +No match + École +No match + +/^\w+/locale=fr_FR + École + 0: École + +/(.+)\b(.+)/ + École + 0: \xc9cole + 1: \xc9 + 2: cole + +/(.+)\b(.+)/locale=fr_FR + *** Failers + 0: *** Failers + 1: *** + 2: Failers + École +No match + +/École/i + École + 0: \xc9cole + *** Failers +No match + école +No match + +/École/i,locale=fr_FR + École + 0: École + école + 0: école + +/\w/I +Capturing subpattern count = 0 +No options +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 +No last code unit +Subject length lower bound = 1 + +/\w/I,locale=fr_FR +Capturing subpattern count = 0 +No options +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 + ª µ º À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â + ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 1 + +/^[\xc8-\xc9]/i,locale=fr_FR + École + 0: É + école + 0: é + +/^[\xc8-\xc9]/locale=fr_FR + École + 0: É + *** Failers +No match + école +No match + +/\W+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[\W]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/[^[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: >>> + >>>\xba<<< + 0: >>> + +/\w+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[\w]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]]+/locale=fr_FR + >>>\xaa<<< + 0: ª + >>>\xba<<< + 0: º + +/[[:alpha:]][[:lower:]][[:upper:]]/IB,locale=fr_FR +------------------------------------------------------------------ + Bra + [A-Za-z\x83\x8a\x8c\x8e\x9a\x9c\x9e\x9f\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff] + [a-z\x83\x9a\x9c\x9e\xaa\xb5\xba\xdf-\xf6\xf8-\xff] + [A-Z\x8a\x8c\x8e\x9f\xc0-\xd6\xd8-\xde] + Ket + End +------------------------------------------------------------------ +Capturing subpattern count = 0 +No options +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 ª µ º À Á Â Ã Ä Å Æ Ç + È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í + î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ +No last code unit +Subject length lower bound = 3 + +# End of testinput3