Skip to content
Snippets Groups Projects
Commit a50d02d9 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

updated for version 7.3.1207

Problem:    New regexp engine: no match found on "#if FOO". (Lech Lorens)
Solution:   When adding a state gets skipped don't adjust the index.
parent 5ab9d98b
No related branches found
Tags v7.3.1207
No related merge requests found
......@@ -4210,6 +4210,8 @@ addstate_here(l, state, subs, pim, ip)
/* re-order to put the new state at the current position */
count = l->n - tlen;
if (count == 0)
return; /* no state got added */
if (count == 1)
{
/* overwrite the current state */
......
......@@ -408,6 +408,8 @@ STARTTEST
:"""" Requiring lots of states.
:call add(tl, [2, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678-1234-1234-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"])
:"
:"""" Skip adding state twice
:call add(tl, [2, '^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=', "#if FOO", "#if", ' FOO'])
:"
:"""" Run the tests
:"
......
......@@ -913,6 +913,9 @@ OK 2 - \_[^a]\+
OK 0 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
OK 1 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
OK 2 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
OK 0 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
OK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
multi-line tests
OK 0 - ^.\(.\).\_..\1.
OK 1 - ^.\(.\).\_..\1.
......
......@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1207,
/**/
1206,
/**/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment