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; \
|
||||
goto rec##nn; \
|
||||
case WBEG: \
|
||||
if ((sp != s && isword(sp)) || !isword(_sp)) \
|
||||
if (((sp != s || sp != _sp) && isword(sp)) \
|
||||
|| !isword(_sp)) \
|
||||
deccheck(nn) \
|
||||
npc++; goto rec##nn; \
|
||||
case WEND: \
|
||||
|
||||
3
test.sh
3
test.sh
@@ -114,6 +114,7 @@ qwerty.*$
|
||||
(.+)(.+)
|
||||
a(?:b|c|d){4,5}(.)
|
||||
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
|
||||
\\\\<abc
|
||||
"
|
||||
input="\
|
||||
abcdef
|
||||
@@ -229,6 +230,7 @@ abaaa
|
||||
abcd
|
||||
acdbcdbe
|
||||
cabbbb
|
||||
dabc
|
||||
"
|
||||
expect="\
|
||||
(0,3)
|
||||
@@ -344,6 +346,7 @@ expect="\
|
||||
(0,4)(0,3)(3,4)
|
||||
(0,7)(6,7)
|
||||
(0,6)
|
||||
-nomatch-
|
||||
(0,0)
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user