From 2af4a5f9fd206386c1b24e340c4b88b802dfdd88 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Tue, 29 Oct 2024 00:25:38 -0400 Subject: [PATCH] Added more tests --- re_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/re_test.go b/re_test.go index 44c16a9..9b20179 100644 --- a/re_test.go +++ b/re_test.go @@ -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) {