From 7e7e75903dd26a497e0f7aa5ce4199b6fb70dd66 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Sun, 27 Oct 2024 15:11:02 -0400 Subject: [PATCH] Added more tests --- re_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/re_test.go b/re_test.go index 22fd168..4b5e2a7 100644 --- a/re_test.go +++ b/re_test.go @@ -25,6 +25,10 @@ var reTests = []struct { {"b*a*a", "bba", []matchIndex{{0, 3}}}, {"(ab)+", "abcabddd", []matchIndex{{0, 2}, {3, 5}}}, {"a(b(c|d)*)*", "abccbd", []matchIndex{{0, 6}}}, + {"a(b|c)*d+", "abccdd", []matchIndex{{0, 6}}}, + {"a*", "", []matchIndex{{0, 0}}}, + {"a|b", "c", []matchIndex{}}, + {"(a|b)*c", "aabbc", []matchIndex{{0, 5}}}, } func TestFindAllMatches(t *testing.T) {