Hi PhilI cannot find what is wrong with my email!
I double checked for #define SUPPORT_PCRE2_8 in my config.h and it was there. Then I followed the instructions (see excerpt from the compiler listing below). Then I ran it and sure enough, the output is same as before (see attached)
7260 2139 |while (notdone) 7261 | { 7262 | uint8_t *p; 7263 2140 | int rc = PR_OK; 7264 2141 | BOOL expectdata = TEST(compiled_code, !=, NULL); 7265 |#ifdef SUPPORT_PCRE2_8 7266 2142 | expectdata |= preg.re_pcre2_code != NULL; 7267 2143 |fprintf(outfile, "+++expectdata=%d\n", expectdata); /* <====== Add 7268 |#endif 7269 | 7270 2144 | if (extend_inputline(infile, buffer, expectdata? "data> " : " re7271 2145 | break; 7272 2146 | if (!INTERACTIVE(infile)) fprintf(outfile, "%s", (char *)buffer);7273 2148 | fflush(outfile); 7274 2149 | p = buffer; Ze'ev Atlas
From: "ph10@???" <ph10@???>
To: Ze'ev Atlas <zatlas1@???>
Cc: "pcre-dev@???" <pcre-dev@???>
Sent: Wednesday, December 30, 2015 4:16 AM
Subject: Re: [pcre-dev] A question about testinput18
On Wed, 30 Dec 2015, Ze'ev Atlas wrote:
> It is 0 all the time. Enclosed is the output file (translated to ASCII as usual) Ze'ev Atlas
So it isn't recognising that it has a compiled pattern to test. Did you
check that SUPPORT_PCRE2_8 is defined? Another test would be to move the
added line:
while (notdone)
{
uint8_t *p;
int rc = PR_OK;
BOOL expectdata = TEST(compiled_code, !=, NULL);
#ifdef SUPPORT_PCRE2_8
expectdata |= preg.re_pcre2_code != NULL;
fprintf(outfile, "+++expectdata=%d\n", expectdata); /* <====== Add this line */
#endif
I've moved it inside the #ifdef. If there is no output, then it's not
seeing SUPPORT_PCRE2_8. If there *is* output, something else is going
wrong ... and I will have to think about it.
Philip
--
Philip Hazel
PCRE2 version 10.21-RC1 2015-12-15
+++expectdata=0
# This set of tests is run only with the 8-bit library. It tests the POSIX
+++expectdata=0
# interface, which is supported only with the 8-bit library. This test should
+++expectdata=0
# not be run with JIT (which is not available for the POSIX interface).
+++expectdata=0
+++expectdata=0
#forbid_utf
+++expectdata=0
#pattern posix
+++expectdata=0
+++expectdata=0
# Test invalid options
+++expectdata=0
+++expectdata=0
/abc/auto_callout
** Ignored with POSIX interface: auto_callout
+++expectdata=0
+++expectdata=0
/abc/
+++expectdata=0
abc\=find_limits
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/abc/
+++expectdata=0
abc\=partial_hard
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
# Real tests
+++expectdata=0
+++expectdata=0
/abc/
+++expectdata=0
abc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/¬abc|def/
+++expectdata=0
abcdef
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
abcdef\=notbol
+++expectdata=0
+++expectdata=0
/.*((abc)$|(def))/
+++expectdata=0
defabc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
defabc\=noteol
+++expectdata=0
+++expectdata=0
/the quick brown fox/
+++expectdata=0
the quick brown fox
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
\= Expect no match
+++expectdata=0
The Quick Brown Fox
+++expectdata=0
+++expectdata=0
/the quick brown fox/i
** Unrecognized modifier 'i' in 'i'
+++expectdata=0
the quick brown fox
+++expectdata=0
The Quick Brown Fox
+++expectdata=0
+++expectdata=0
/(*LF)abc.def/
+++expectdata=0
\= Expect no match
** Invalid pattern delimiter '\' (xe0).
+++expectdata=0
abc\ndef
+++expectdata=0
+++expectdata=0
/(*LF)abc$/
+++expectdata=0
abc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
abc\n
+++expectdata=0
+++expectdata=0
/(abc)\2/
Failed: POSIX code 6: invalid backreference number
+++expectdata=0
+++expectdata=0
/(abc\1)/
Failed: POSIX code 6: invalid backreference number
+++expectdata=0
\= Expect no match
+++expectdata=0
abc
+++expectdata=0
+++expectdata=0
/a*(b+)(z)(z)/
+++expectdata=0
aaaabbbbzzzz
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
aaaabbbbzzzz\=ovector=0
+++expectdata=0
aaaabbbbzzzz\=ovector=1
+++expectdata=0
aaaabbbbzzzz\=ovector=2
+++expectdata=0
+++expectdata=0
/(*ANY)ab.cd/
+++expectdata=0
ab-cd
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
ab=cd
+++expectdata=0
\= Expect no match
+++expectdata=0
ab\ncd
+++expectdata=0
+++expectdata=0
/ab.cd/s
** Unrecognized modifier 's' in 's'
+++expectdata=0
ab-cd
+++expectdata=0
ab=cd
+++expectdata=0
ab\ncd
+++expectdata=0
+++expectdata=0
/a(b)c/no_auto_capture
+++expectdata=0
abc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/a(?P<name>b)c/no_auto_capture
+++expectdata=0
abc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/a?|b?/
+++expectdata=0
abc
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
\= Expect no match
+++expectdata=0
ddd\=notempty
+++expectdata=0
+++expectdata=0
/\w+A/
+++expectdata=0
CDAAAAB
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/\w+A/ungreedy
+++expectdata=0
CDAAAAB
** Invalid pattern delimiter ' ' (x40).
+++expectdata=0
+++expectdata=0
/\Biss\B/I,aftertext
** Unrecognized modifier 'I' in 'I'
+++expectdata=0
Mississippi
+++expectdata=0
+++expectdata=0
/abc/\
Failed: POSIX code 5: last character is \
+++expectdata=0
+++expectdata=0
"(?(?C)"
+++expectdata=0
+++expectdata=0
/abcd/substitute_extended
** Ignored with POSIX interface: substitute_extended
+++expectdata=0
+++expectdata=0
/\[A]{1000000}**/expand,regerror_buffsize=31
Failed: POSIX code 12: out of memory
+++expectdata=0
+++expectdata=0
/\[A]{1000000}**/expand,regerror_buffsize=32
Failed: POSIX code 12: out of memory
+++expectdata=0
+++expectdata=0
# End of testdata/testinput18
+++expectdata=0