From 956bdbdcb6eb688c0517586fd3712c352af02140 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Sun, 27 Oct 2024 11:18:18 -0400 Subject: [PATCH] Added test case --- re_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/re_test.go b/re_test.go index c84dec2..6340d4f 100644 --- a/re_test.go +++ b/re_test.go @@ -21,8 +21,9 @@ var reTests = []struct { {"ab*", "abb", []matchIndex{{0, 3}}}, {"(abc)*", "abcabcabc", []matchIndex{{0, 9}}}, {"((abc)|(def))*", "abcdef", []matchIndex{{0, 6}}}, - {"(abc)*|(def)*", "abcdef", []matchIndex{{0, 3}, {3, 6}}}, + {"(abc)*|(def)*", "abcdef", []matchIndex{{0, 3}, {3, 3}, {3, 6}, {6, 6}}}, {"b*a*a", "bba", []matchIndex{{0, 3}}}, + {"(ab)+", "ababddd", []matchIndex{{0, 2}, {2, 4}}}, } func TestFindAllMatches(t *testing.T) {