The "offset" modifier in pcre2test was not being ignored (as documented) for
POSIX.
This commit is contained in:
parent
cfa7e70148
commit
d117300a1d
|
@ -92,6 +92,9 @@ only when PCRE2_NO_START_OPTIMIZE was *not* set:
|
||||||
(?=.*[A-Z])(?=.{8,16})(?!.*[\s]) matches after the start in lines that
|
(?=.*[A-Z])(?=.{8,16})(?!.*[\s]) matches after the start in lines that
|
||||||
start with spaces. Starting .* in an assertion is no longer taken as an
|
start with spaces. Starting .* in an assertion is no longer taken as an
|
||||||
indication of matching at the start (or after a newline).
|
indication of matching at the start (or after a newline).
|
||||||
|
|
||||||
|
16. The "offset" modifier in pcre2test was not being ignored (as documented)
|
||||||
|
when the POSIX API was in use.
|
||||||
|
|
||||||
|
|
||||||
Version 10.22 29-July-2016
|
Version 10.22 29-July-2016
|
||||||
|
|
|
@ -6065,6 +6065,7 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
|
||||||
if (dat_datctl.get_numbers[0] >= 0 || dat_datctl.get_names[0] != 0)
|
if (dat_datctl.get_numbers[0] >= 0 || dat_datctl.get_names[0] != 0)
|
||||||
prmsg(&msg, "get");
|
prmsg(&msg, "get");
|
||||||
if (dat_datctl.jitstack != 0) prmsg(&msg, "jitstack");
|
if (dat_datctl.jitstack != 0) prmsg(&msg, "jitstack");
|
||||||
|
if (dat_datctl.offset != 0) prmsg(&msg, "offset");
|
||||||
|
|
||||||
if ((dat_datctl.options & ~POSIX_SUPPORTED_MATCH_OPTIONS) != 0)
|
if ((dat_datctl.options & ~POSIX_SUPPORTED_MATCH_OPTIONS) != 0)
|
||||||
{
|
{
|
||||||
|
@ -6087,9 +6088,8 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
|
||||||
if ((dat_datctl.options & PCRE2_NOTBOL) != 0) eflags |= REG_NOTBOL;
|
if ((dat_datctl.options & PCRE2_NOTBOL) != 0) eflags |= REG_NOTBOL;
|
||||||
if ((dat_datctl.options & PCRE2_NOTEOL) != 0) eflags |= REG_NOTEOL;
|
if ((dat_datctl.options & PCRE2_NOTEOL) != 0) eflags |= REG_NOTEOL;
|
||||||
if ((dat_datctl.options & PCRE2_NOTEMPTY) != 0) eflags |= REG_NOTEMPTY;
|
if ((dat_datctl.options & PCRE2_NOTEMPTY) != 0) eflags |= REG_NOTEMPTY;
|
||||||
|
|
||||||
rc = regexec(&preg, (const char *)pp + dat_datctl.offset,
|
rc = regexec(&preg, (const char *)pp, dat_datctl.oveccount, pmatch, eflags);
|
||||||
dat_datctl.oveccount, pmatch, eflags);
|
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
{
|
{
|
||||||
(void)regerror(rc, &preg, (char *)pbuffer8, pbuffer8_size);
|
(void)regerror(rc, &preg, (char *)pbuffer8, pbuffer8_size);
|
||||||
|
|
|
@ -103,4 +103,7 @@
|
||||||
|
|
||||||
/\[A]{1000000}**/expand,regerror_buffsize=32
|
/\[A]{1000000}**/expand,regerror_buffsize=32
|
||||||
|
|
||||||
|
//posix_nosub
|
||||||
|
\=offset=70000
|
||||||
|
|
||||||
# End of testdata/testinput18
|
# End of testdata/testinput18
|
||||||
|
|
|
@ -157,4 +157,9 @@ Failed: POSIX code 4: ? * + invalid at offset 100000
|
||||||
/\[A]{1000000}**/expand,regerror_buffsize=32
|
/\[A]{1000000}**/expand,regerror_buffsize=32
|
||||||
Failed: POSIX code 4: ? * + invalid at offset 1000001
|
Failed: POSIX code 4: ? * + invalid at offset 1000001
|
||||||
|
|
||||||
|
//posix_nosub
|
||||||
|
\=offset=70000
|
||||||
|
** Ignored with POSIX interface: offset
|
||||||
|
Matched with REG_NOSUB
|
||||||
|
|
||||||
# End of testdata/testinput18
|
# End of testdata/testinput18
|
||||||
|
|
Loading…
Reference in New Issue