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) {