]> Sergey Matveev's repositories - path-extractor.git/blobdiff - pe_test.go
Add check for invalid strings
[path-extractor.git] / pe_test.go
index c9726174fd46962e9859cbaf13deb1ce41ecf0f8..dde9cf85de6df6f8275ed7dca7f3b895521ec6a1 100644 (file)
@@ -157,6 +157,16 @@ func TestEverything(t *testing.T) {
                t.Errorf("Doesnt match multiple extensions", output)
        }
 
+       output = GetAllMatches("[Error/foobar]", "")
+       if len(output) == 1 {
+               t.Errorf("Matches error", output)
+       }
+
+       output = GetAllMatches("[Object.foo]", "")
+       if len(output) == 1 {
+               t.Errorf("Matches Object.foo", output)
+       }
+
        output = GetAllMatches("(user.js)", "")
        if len(output) != 1 {
                t.Errorf("Doesnt match surrounded by parens", output)