t.Errorf("Matches sentence", output)
}
+ output = GetAllMatches("/var//log", MatchOptions{})
+ if len(output) != 0 {
+ t.Errorf("Matches double //", output)
+ }
+
output = GetAllMatches("s/+//", MatchOptions{})
if len(output) != 0 {
t.Errorf("Doesn't match substitute", output)
}
func containsInvalidString(input string) bool {
- invalidStrings := []string{"()", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."}
+ invalidStrings := []string{"//", "()", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."}
for _, s := range invalidStrings {
if strings.Contains(input, s) {
return true