Added another test, changed function calls to match new names

master
Aadhavan Srinivasan 2 days ago
parent 3a3333b38a
commit fcdb4a8868

@ -148,6 +148,7 @@ var reTests = []struct {
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "040", []Group{}},
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "400", []Group{{0, 3}}},
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "4000", []Group{}},
{"a{1,3}", "aaaaa", []Group{{0, 3}, {3, 5}}},
// Lookaround tests
{"(?<=bo)y", "boy", []Group{{2, 3}}},
@ -191,7 +192,7 @@ func TestFindAllMatches(t *testing.T) {
if err != nil {
panic(err)
}
matchIndices := findAllMatches(regComp, test.str)
matchIndices := FindAllMatches(regComp, test.str)
zeroGroups := make([]Group, len(matchIndices))
for i, m := range matchIndices {
zeroGroups[i] = m[0]
@ -210,7 +211,7 @@ func TestFindAllGroups(t *testing.T) {
if err != nil {
panic(err)
}
matchIndices := findAllMatches(regComp, test.str)
matchIndices := FindAllMatches(regComp, test.str)
for i := range matchIndices {
for j := range matchIndices[i] {
if matchIndices[i][j].isValid() {

Loading…
Cancel
Save