Fix bugs of omission in new script run code.

This commit is contained in:
Philip.Hazel 2018-10-03 15:41:47 +00:00
parent 866750fd53
commit cda4780fb6
5 changed files with 63 additions and 0 deletions

View File

@ -8640,6 +8640,7 @@ for (;; pptr++)
case META_LOOKBEHIND:
case META_LOOKBEHINDNOT:
case META_NOCAPTURE:
case META_SCRIPT_RUN:
nestlevel++;
break;
@ -9052,6 +9053,7 @@ for (;; pptr++)
case META_ATOMIC:
case META_NOCAPTURE:
case META_SCRIPT_RUN:
pptr++;
CHECK_GROUP:
grouplength = get_grouplength(&pptr, TRUE, errcodeptr, lcptr, group,
@ -9231,6 +9233,7 @@ for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++)
case META_QUERY_QUERY:
case META_RANGE_ESCAPED:
case META_RANGE_LITERAL:
case META_SCRIPT_RUN:
case META_SKIP:
case META_THEN:
break;

10
testdata/testinput4 vendored
View File

@ -2395,6 +2395,16 @@
\= Expect no match
\x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
/(?<!)(*sr:)/
/(?<!X(*sr:B)C)/
/(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
abcXBCYZ!
/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
abcXBXYCCC!
# Test loop breaking for empty string match
/^(*sr:A|)*BCD/utf

5
testdata/testinput5 vendored
View File

@ -2116,6 +2116,11 @@
/^(*sr:\x{2e80}*)\x{2e80}/B,utf
/(?<!)(*sr:)/B
/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./B
abcXBXYCCC!
# Some script run patterns are broken in Perl 5.28.0. These can be moved into
# test 4 when a mended version of Perl is released.

12
testdata/testoutput4 vendored
View File

@ -3873,6 +3873,18 @@ No match
\x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
No match
/(?<!)(*sr:)/
/(?<!X(*sr:B)C)/
/(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
abcXBCYZ!
0: !
/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
abcXBXYCCC!
0: !
# Test loop breaking for empty string match
/^(*sr:A|)*BCD/utf

33
testdata/testoutput5 vendored
View File

@ -4814,6 +4814,39 @@ MK: ABC
End
------------------------------------------------------------------
/(?<!)(*sr:)/B
------------------------------------------------------------------
Bra
AssertB not
Ket
Script run
Ket
Ket
End
------------------------------------------------------------------
/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./B
------------------------------------------------------------------
Bra
AssertB
Reverse
abc
Assert
X
Script run
BXY
Ket
CCC
Ket
XBXYCCC
Ket
Any
Ket
End
------------------------------------------------------------------
abcXBXYCCC!
0: !
# Some script run patterns are broken in Perl 5.28.0. These can be moved into
# test 4 when a mended version of Perl is released.