From d98699900186f1e152225c6b56e1a157ddd3b844 Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Wed, 20 Nov 2024 10:38:57 -0500 Subject: [PATCH] Added more tests --- re_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/re_test.go b/re_test.go index b3d3dc6..6cfc605 100644 --- a/re_test.go +++ b/re_test.go @@ -77,6 +77,7 @@ var reTests = []struct { {"[^a]+", "qqqaq", []MatchIndex{{0, 3}, {4, 5}}}, {"[^0-9]+", "a1b2c3dd", []MatchIndex{{0, 1}, {2, 3}, {4, 5}, {6, 8}}}, {"[^abc]+", "ababababbababaccacacacaca", []MatchIndex{}}, + {`\[`, "a[b[c[]]]", []MatchIndex{{1, 2}, {3, 4}, {5, 6}}}, {`\([^)]+\)`, "Not (paranthesized), (so) is (this) not", []MatchIndex{{4, 19}, {21, 25}, {29, 35}}}, {"^ab", "ab bab", []MatchIndex{{0, 2}}}, @@ -113,6 +114,7 @@ var reTests = []struct { // Unicode tests {`.+`, "úïäö´«åæïëòöê»éãçâï«úïòíñ", []MatchIndex{{0, 25}}}, {`a.b`, "a²b", []MatchIndex{{0, 3}}}, + {`[^a]+`, "úïäö´«åæïëòöê»éãçâï«úïòíñ", []MatchIndex{{0, 25}}}, } func TestFindAllMatches(t *testing.T) {