]> Sergey Matveev's repositories - path-extractor.git/commitdiff
Path-extractor doesn't match this
authorEdgar HIPP <hipp.edg@gmail.com>
Sun, 30 Aug 2015 15:06:57 +0000 (17:06 +0200)
committerEdgar HIPP <hipp.edg@gmail.com>
Sun, 30 Aug 2015 15:06:57 +0000 (17:06 +0200)
pe_test.go
validators.go

index 20999277318755174e7fede997d55104cb16c09d..58c138fc877e173254de4f87f73afeba02df93a3 100644 (file)
@@ -18,6 +18,11 @@ func TestGitIgnore(t *testing.T) {
                t.Errorf("Doesnt match hidden files", output)
        }
 
+       output = GetAllMatches(" this.user ")
+       if len(output) != 0 {
+               t.Errorf("Matches this.user", output)
+       }
+
        output = GetAllMatches(" mail@mail.com ")
        if len(output) != 0 {
                t.Errorf("Matches email adresses", output)
index 2ed2a880065e7d97e9f5d6e64b3c724edeeb71f4..b0501d6839111588ad0bfb4903b597ad41a0c77e 100644 (file)
@@ -67,7 +67,7 @@ func endsWithInvalidString(input string) bool {
 }
 
 func containsInvalidString(input string) bool {
-       invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*"}
+       invalidStrings := []string{"(", ")", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."}
        for _, s := range invalidStrings {
                if strings.Contains(input, s) {
                        return true