Added more tests

master
Aadhavan Srinivasan 2 months ago
parent 76157af2b8
commit 2af4a5f9fd

@ -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) {

Loading…
Cancel
Save