From fd957d951866d11d9f2fa96415a9f8b3dd1e0777 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Thu, 31 Oct 2024 17:55:07 -0400 Subject: [PATCH] Added more test cases --- re_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/re_test.go b/re_test.go index bfcf160..5a4178f 100644 --- a/re_test.go +++ b/re_test.go @@ -87,6 +87,13 @@ var reTests = []struct { {`\bint\b`, "print int integer", []matchIndex{{6, 9}}}, {`int(\b|a)`, "inta", []matchIndex{{0, 4}}}, {`\b\d+\b`, "511 a3 43", []matchIndex{{0, 3}, {7, 9}}}, + {`\Bint\B`, "prints int integer print", []matchIndex{{2, 5}}}, + {`^`, "5^3^2", []matchIndex{{0, 0}}}, + {`\^`, "5^3^2", []matchIndex{{1, 2}, {3, 4}}}, + {`pool$`, "pool carpool", []matchIndex{{8, 12}}}, + {`^int$`, "print int integer", []matchIndex{}}, + {`^int$`, "int", []matchIndex{{0, 3}}}, + {`b*`, "aaaaaaaaaaqweqwe", []matchIndex{{0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}, {9, 9}, {10, 10}, {11, 11}, {12, 12}, {13, 13}, {14, 14}, {15, 15}, {16, 16}}}, } func TestFindAllMatches(t *testing.T) {