Re: [pcre-dev] A question about testinput18

Página Principal
Apagar esta mensagem
Autor: ph10
Data:  
Para: Ze'ev Atlas
CC: Pcre Exim
Assunto: Re: [pcre-dev] A question about testinput18
On Mon, 28 Dec 2015, Ze'ev Atlas wrote:

> Hi PhilipI am testing PCRE2 21 RC1 in EBCDIC (on native z/OS).


Thanks!

Your emails are still coming through rather mangled and losing newlines
for some reason. I looked at the raw email text and found that you are
sending both a plain text and an HTML text copy. The HTML is formatted
OK, enabling me to read it, but the plain test starts like this:

------=_Part_4009314_1515033155.1451267841618
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi PhilipI am testing PCRE2 21 RC1 in EBCDIC (on native z/OS). =C2=A0There =
were quite a few changes in your test suite so I will have to go back and r=
edo some of the EBCDIC specific stuff. =C2=A0But before I do that I looked =
at my output vs. yours in what I deemed as relevant tests. =C2=A0That, in o=
rder to identify differences and either explain them or develop an EBCDIC c=
ounterpart. =C2=A0The most striking differences were in test 18.
in test 18 you get:-----------------------/abc/=C2=A0 =C2=A0abc\=3Dfind_lim=
its** Ignored with POSIX interface: find_limits=C2=A00: abc
/abc/=C2=A0 abc\=3Dpartial_hard** Ignored with POSIX interface: partial_har=
d=C2=A00: abc
# Real tests

As you can see, it looks like =C2=A0 appears where there should be
newlines, but sometimes there is nothing where a newline should be. I
used two different email clients but neither of them displays the plain
text sensibly.

Anyway, on to your substantive question:

While I get:

/abc/
   abc\=find_limits
** Invalid pattern delimiter ' ' (x40).

That looks very much as though pcre2test thinks that the subject line is
a pattern line, which is why it is complaining about an invalid pattern
delimiter. That seems very odd, since it hasn't complained about the
pattern line. The code around line 7259 of pcre2test.c is where it tests
to see if it has a compiled pattern, and if so, processes a data line.

  BOOL expectdata = TEST(compiled_code, !=, NULL);                        
#ifdef SUPPORT_PCRE2_8                                                  
  expectdata |= preg.re_pcre2_code != NULL;                        
#endif    


The second line is testing for a compiled pattern using the POSIX
interface. If that is going wrong, it would explain what you are seeing.

Philip

--
Philip Hazel