t.Errorf("Matches sentence", output)
}
+ output = GetAllMatches("prefix=/usr/bin", MatchOptions{})
+ if len(output) != 1 {
+ t.Errorf("Should match =/usr/bin", output)
+ }
+ if output[0] != "/usr/bin" {
+ t.Errorf("Doesn't match statement correctly", 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)
+ }
+
+ output = GetAllMatches("s/^//", MatchOptions{})
+ if len(output) != 0 {
+ t.Errorf("Doesn't match substitute", output)
+ }
+
output = GetAllMatches("/usr/bin/env\\", MatchOptions{})
if len(output) != 1 {
t.Errorf("Doesn't match escaped", output)