mirror of
https://github.com/PCRE2Project/pcre2.git
synced 2025-10-18 08:44:04 +08:00
Fix heapsort in capture list construction (#748)
This commit is contained in:
@@ -479,6 +479,7 @@ while (TRUE)
|
||||
tmp = captures[i];
|
||||
captures[i] = captures[max];
|
||||
captures[max] = tmp;
|
||||
i = max;
|
||||
}
|
||||
}
|
||||
|
||||
|
3
testdata/testinput2
vendored
3
testdata/testinput2
vendored
@@ -7961,6 +7961,9 @@ a)"xI
|
||||
\= Expect no match
|
||||
Saturday,Sun
|
||||
|
||||
/()()()(?2(2,3,2,3,2))/B
|
||||
abc
|
||||
|
||||
# Test each syntax used for recursion
|
||||
|
||||
/(?(R)(Sat)urday|(?R(1)),\1)/
|
||||
|
21
testdata/testoutput2
vendored
21
testdata/testoutput2
vendored
@@ -22408,6 +22408,27 @@ No match
|
||||
Saturday,Sun
|
||||
No match
|
||||
|
||||
/()()()(?2(2,3,2,3,2))/B
|
||||
------------------------------------------------------------------
|
||||
Bra
|
||||
CBra 1
|
||||
Ket
|
||||
CBra 2
|
||||
Ket
|
||||
CBra 3
|
||||
Ket
|
||||
Recurse
|
||||
2 Capture ref
|
||||
3 Capture ref
|
||||
Ket
|
||||
End
|
||||
------------------------------------------------------------------
|
||||
abc
|
||||
0:
|
||||
1:
|
||||
2:
|
||||
3:
|
||||
|
||||
# Test each syntax used for recursion
|
||||
|
||||
/(?(R)(Sat)urday|(?R(1)),\1)/
|
||||
|
Reference in New Issue
Block a user