Added more tests
This commit is contained in:
@@ -56,6 +56,13 @@ var reTests = []struct {
|
||||
{"[Ff]r[Uu|]it", "Fr|it", []matchIndex{{0, 5}}},
|
||||
{"[Ff]r([Uu]|[pP])it", "Frpit", []matchIndex{{0, 5}}},
|
||||
{"[Ff]r[Uu]|[pP]it", "Frpit", []matchIndex{{2, 5}}},
|
||||
{"[a-zA-Z]+", "Hello, how is it going?", []matchIndex{{0, 5}, {7, 10}, {11, 13}, {14, 16}, {17, 22}}},
|
||||
|
||||
{".+", "Hello, how is it going?", []matchIndex{{0, 23}}},
|
||||
{"a.", "a ", []matchIndex{{0, 2}}},
|
||||
{"a.b", "a/b", []matchIndex{{0, 3}}},
|
||||
{".", "a ", []matchIndex{{0, 2}}},
|
||||
{"a.", "a ", []matchIndex{{0, 2}}},
|
||||
}
|
||||
|
||||
func TestFindAllMatches(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user