fix edge case with word condt
This commit is contained in:
3
pike.c
3
pike.c
@@ -513,7 +513,8 @@ for (j = 0; j < nsubp; j++) s1->sub[j] = nsub->sub[j]; \
|
|||||||
npc += 2; \
|
npc += 2; \
|
||||||
goto rec##nn; \
|
goto rec##nn; \
|
||||||
case WBEG: \
|
case WBEG: \
|
||||||
if ((sp != s && isword(sp)) || !isword(_sp)) \
|
if (((sp != s || sp != _sp) && isword(sp)) \
|
||||||
|
|| !isword(_sp)) \
|
||||||
deccheck(nn) \
|
deccheck(nn) \
|
||||||
npc++; goto rec##nn; \
|
npc++; goto rec##nn; \
|
||||||
case WEND: \
|
case WEND: \
|
||||||
|
|||||||
3
test.sh
3
test.sh
@@ -114,6 +114,7 @@ qwerty.*$
|
|||||||
(.+)(.+)
|
(.+)(.+)
|
||||||
a(?:b|c|d){4,5}(.)
|
a(?:b|c|d){4,5}(.)
|
||||||
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
|
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
|
||||||
|
\\\\<abc
|
||||||
"
|
"
|
||||||
input="\
|
input="\
|
||||||
abcdef
|
abcdef
|
||||||
@@ -229,6 +230,7 @@ abaaa
|
|||||||
abcd
|
abcd
|
||||||
acdbcdbe
|
acdbcdbe
|
||||||
cabbbb
|
cabbbb
|
||||||
|
dabc
|
||||||
"
|
"
|
||||||
expect="\
|
expect="\
|
||||||
(0,3)
|
(0,3)
|
||||||
@@ -344,6 +346,7 @@ expect="\
|
|||||||
(0,4)(0,3)(3,4)
|
(0,4)(0,3)(3,4)
|
||||||
(0,7)(6,7)
|
(0,7)(6,7)
|
||||||
(0,6)
|
(0,6)
|
||||||
|
-nomatch-
|
||||||
(0,0)
|
(0,0)
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user