summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--doc/pcretest.17
-rwxr-xr-xmaint/ManyConfigTests17
-rw-r--r--pcretest.c12
-rw-r--r--testdata/testinput182
-rw-r--r--testdata/testoutput18-164
-rw-r--r--testdata/testoutput18-324
7 files changed, 35 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 180733d..46224be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,6 +86,13 @@ Version 8.35-RC1 xx-xxxx-201x
provokes an error. The invalid example in README has been corrected.
If a value less than the minimum is given, the minimum value has always
been used, but now a warning is given.
+
+17. If --enable-bsr-anycrlf was set, the special 16/32-bit test failed. This
+ was a bug in the test system, which is now fixed. Also, the list of various
+ configurations that are tested for each release did not have one with both
+ 16/32 bits and --enable-bar-anycrlf. It now does.
+
+18. pcretest was missing "-C bsr" for displaying the \R default setting.
Version 8.34 15-December-2013
diff --git a/doc/pcretest.1 b/doc/pcretest.1
index 5a8ec58..acdfcc7 100644
--- a/doc/pcretest.1
+++ b/doc/pcretest.1
@@ -1,4 +1,4 @@
-.TH PCRETEST 1 "03 January 2014" "PCRE 8.35"
+.TH PCRETEST 1 "17 January 2014" "PCRE 8.35"
.SH NAME
pcretest - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@@ -113,6 +113,9 @@ following options output the value and set the exit code as indicated:
newline the default newline setting:
CR, LF, CRLF, ANYCRLF, or ANY
exit code is always 0
+ bsr the default setting for what \eR matches:
+ ANYCRLF or ANY
+ exit code is always 0
.sp
The following options output 1 for true or 0 for false, and set the exit code
to the same value:
@@ -1138,6 +1141,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 03 January 2014
+Last updated: 17 January 2014
Copyright (c) 1997-2014 University of Cambridge.
.fi
diff --git a/maint/ManyConfigTests b/maint/ManyConfigTests
index b08495c..d9c3ae0 100755
--- a/maint/ManyConfigTests
+++ b/maint/ManyConfigTests
@@ -39,7 +39,7 @@ if [ $? -eq 0 ] && grep GCC zzz >/dev/null; then
ISGCC="yes"
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wno-overlength-strings"
- CFLAGS="$CFLAGS -Wpointer-arith"
+ CFLAGS="$CFLAGS -Wpointer-arith"
CFLAGS="$CFLAGS -Wwrite-strings"
CFLAGS="$CFLAGS -Wundef -Wshadow"
CFLAGS="$CFLAGS -Wextra -Wformat"
@@ -50,7 +50,7 @@ if [ $? -eq 0 ] && grep GCC zzz >/dev/null; then
CFLAGS="$CFLAGS -Wuninitialized"
CFLAGS="$CFLAGS -Wmissing-prototypes"
CFLAGS="$CFLAGS -Wstrict-prototypes"
-fi
+fi
# This function runs a single test with the set of configuration options that
@@ -59,7 +59,7 @@ fi
function runtest()
{
rm -f *_unittest
- testcount=`expr $testcount + 1`
+ testcount=`expr $testcount + 1`
if [ "$opts" = "" ] ; then
echo "[$testcount/$testtotal] Configuring with: default settings"
@@ -70,7 +70,7 @@ function runtest()
CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" \
$srcdir/configure $opts >/dev/null 2>teststderr
-
+
if [ $? -ne 0 ]; then
echo " "
echo "**** Error while configuring ****"
@@ -83,7 +83,7 @@ function runtest()
if [ $? -ne 0 -o -s teststderr ]; then
echo " "
echo "**** Errors or warnings while making ****"
- echo " "
+ echo " "
cat teststderr
exit 1
fi
@@ -189,9 +189,9 @@ if [ "$ISGCC" = "yes" ]; then
echo "Maximally configured test with -O2"
SAVECLFAGS="$CFLAGS"
CFLAGS="$CFLAGS -O2"
- opts="--disable-shared --enable-unicode-properties --enable-jit --enable-pcre16 --enable-pcre32"
+ opts="--disable-shared --enable-unicode-properties --enable-jit --enable-pcre16 --enable-pcre32"
runtest
- CFLAGS="$SAVECFLAGS"
+ CFLAGS="$SAVECFLAGS"
fi
echo "General tests in the current directory"
@@ -230,7 +230,8 @@ for opts in \
"--enable-pcre32 --enable-unicode-properties --disable-stack-for-recursion --disable-shared" \
"--enable-pcre32 --enable-jit --enable-unicode-properties --with-link-size=4 --disable-shared" \
"--enable-pcre32 --enable-pcre16 --disable-shared" \
- "--enable-pcre32 --enable-pcre16 --disable-pcre8 --disable-shared"
+ "--enable-pcre32 --enable-pcre16 --disable-pcre8 --disable-shared" \
+ "--enable-pcre32 --enable-pcre16 --disable-pcre8 --enable-jit --enable-unicode-properties --enable-newline-is-anycrlf --enable-bsr-anycrlf --disable-shared"
do
runtest
done
diff --git a/pcretest.c b/pcretest.c
index d1c0a26..c3ef0b4 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -2883,8 +2883,8 @@ printf(" -32 use the 32-bit library\n");
#endif
printf(" -b show compiled code\n");
printf(" -C show PCRE compile-time options and exit\n");
-printf(" -C arg show a specific compile-time option\n");
-printf(" and exit with its value. The arg can be:\n");
+printf(" -C arg show a specific compile-time option and exit\n");
+printf(" with its value if numeric (else 0). The arg can be:\n");
printf(" linksize internal link size [2, 3, 4]\n");
printf(" pcre8 8 bit library support enabled [0, 1]\n");
printf(" pcre16 16 bit library support enabled [0, 1]\n");
@@ -2892,7 +2892,8 @@ printf(" pcre32 32 bit library support enabled [0, 1]\n");
printf(" utf Unicode Transformation Format supported [0, 1]\n");
printf(" ucp Unicode Properties supported [0, 1]\n");
printf(" jit Just-in-time compiler supported [0, 1]\n");
-printf(" newline Newline type [CR, LF, CRLF, ANYCRLF, ANY, ???]\n");
+printf(" newline Newline type [CR, LF, CRLF, ANYCRLF, ANY]\n");
+printf(" bsr \\R type [ANYCRLF, ANY]\n");
printf(" -d debug: show compiled code and information (-b and -i)\n");
#if !defined NODFA
printf(" -dfa force DFA matching for all subjects\n");
@@ -3231,6 +3232,11 @@ while (argc > 1 && argv[op][0] == '-')
(void)PCRE_CONFIG(PCRE_CONFIG_NEWLINE, &rc);
print_newline_config(rc, TRUE);
}
+ else if (strcmp(argv[op + 1], "bsr") == 0)
+ {
+ (void)PCRE_CONFIG(PCRE_CONFIG_BSR, &rc);
+ printf("%s\n", rc? "ANYCRLF" : "ANY");
+ }
else if (strcmp(argv[op + 1], "ebcdic") == 0)
{
#ifdef EBCDIC
diff --git a/testdata/testinput18 b/testdata/testinput18
index abff34e..2dfb54c 100644
--- a/testdata/testinput18
+++ b/testdata/testinput18
@@ -207,7 +207,7 @@ correctly, but that messes up comparisons). --/
CDBABC
\x{2000}ABC
-/\R*A/SI8
+/\R*A/SI8<bsr_unicode>
CDBABC
\x{2028}A
diff --git a/testdata/testoutput18-16 b/testdata/testoutput18-16
index 0538d7c..a196205 100644
--- a/testdata/testoutput18-16
+++ b/testdata/testoutput18-16
@@ -718,9 +718,9 @@ Starting chars: \x09 \x20 A \xa0 \xff
\x{2000}ABC
0: \x{2000}A
-/\R*A/SI8
+/\R*A/SI8<bsr_unicode>
Capturing subpattern count = 0
-Options: utf
+Options: bsr_unicode utf
No first char
Need char = 'A'
Subject length lower bound = 1
diff --git a/testdata/testoutput18-32 b/testdata/testoutput18-32
index f2d1b0c..1525994 100644
--- a/testdata/testoutput18-32
+++ b/testdata/testoutput18-32
@@ -715,9 +715,9 @@ Starting chars: \x09 \x20 A \xa0 \xff
\x{2000}ABC
0: \x{2000}A
-/\R*A/SI8
+/\R*A/SI8<bsr_unicode>
Capturing subpattern count = 0
-Options: utf
+Options: bsr_unicode utf
No first char
Need char = 'A'
Subject length lower bound = 1