From f714a02e4f43b8fc43c46f33aed89db9f194c9aa Mon Sep 17 00:00:00 2001 From: Edgar HIPP Date: Sun, 30 Aug 2015 17:06:49 +0200 Subject: [PATCH] Update readme with installation method --- .gitignore | 1 + pe_test.go | 5 +++++ validators.go | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3f008b9..7097f7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pe *.txt demo.gif +path-extractor diff --git a/pe_test.go b/pe_test.go index 6545029..cc8ef4d 100644 --- a/pe_test.go +++ b/pe_test.go @@ -18,6 +18,11 @@ func TestGitIgnore(t *testing.T) { t.Errorf("Matches email adresses", output[0]) } + output = GetAllMatches("and/or") + if len(output) != 0 { + t.Errorf("Matches and/or adresses", output[0]) + } + output = GetAllMatches("v1.2") if len(output) != 0 { t.Errorf("Matches version number", output[0]) diff --git a/validators.go b/validators.go index cd9477d..cb09c40 100644 --- a/validators.go +++ b/validators.go @@ -38,7 +38,7 @@ func isVersion(input string) bool { } func containsInvalidString(input string) bool { - invalidStrings := []string{"(", ")", "@", "origin/", "{", "}", "<", ">", "$", "*"} + invalidStrings := []string{"(", ")", "@", "and/or", "origin/", "{", "}", "<", ">", "$", "*"} for _, s := range invalidStrings { if strings.Contains(input, s) { return true -- 2.48.1