Re: [pcre-dev] A question about testinput18

Page principale
Supprimer ce message
Auteur: ph10
Date:  
À: Ze'ev Atlas
CC: pcre-dev@exim.org
Sujet: Re: [pcre-dev] A question about testinput18
On Tue, 29 Dec 2015, Ze'ev Atlas wrote:

> Hi PhilI have a different explanation, and in order to demonstrate it
> I've sent you screen shots in a simple text file (so we won't have the
> formatting issue.)  In my opinion pcre2test complains about the first
> character after the pattern - usually the first character in the next
> line.  See lines 49-51 where it complains about the '\' or, even more
> dramatic, lines 44-45 where it complains about the 'i' modifier.Look
> at line 87-88 (I skipped many lines to the tail of the output) where
> it complains about the '\' instead of complaining about a bad escape
> sequence. Ze'ev Atlas


The file was fine for reading. I still think it is symptomatic of
looking for pattern lines when it should be expecting subject lines.
Please try this test:

1. Check that SUPPORT_PCRE2_8 is #defined in your config.h
2. Add an extra line to pcre2test.c:

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;                                 
#endif         


fprintf(outfile, "+++expectdata=%d\n", expectdata); /* <====== Add this line */

Then compile and run pcre2test on this input:

#pattern posix

/abc/
abc\=find_limits

That is, try one of the tests that fails. If the value of "expectdata"
is always 0, it supports my hypothesis and we then have to figure out
why. If the last value is 1 then something else is wrong.

Philip

--
Philip Hazel