From 3984c5408055021d2cbd6807addeb85c97ae2cab Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Mon, 28 Oct 2024 09:40:21 -0400 Subject: [PATCH] Added more test cases --- re_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/re_test.go b/re_test.go index 98519f0..0a1e726 100644 --- a/re_test.go +++ b/re_test.go @@ -35,6 +35,11 @@ var reTests = []struct { {"ab?", "ab", []matchIndex{{0, 2}}}, {"a?b", "ab", []matchIndex{{0, 2}}}, {"a?", "", []matchIndex{{0, 0}}}, + {"a?b?c", "a", []matchIndex{}}, + {"a?b?c?", "ab", []matchIndex{{0, 2}}}, + {"a?b?c?", "ac", []matchIndex{{0, 2}}}, + {"a?b?c", "abc", []matchIndex{{0, 3}}}, + {"a?b?c", "acb", []matchIndex{{0, 2}}}, } func TestFindAllMatches(t *testing.T) {