+ output = GetAllMatches("2.0G", "")
+ if len(output) != 0 {
+ t.Error("File size matches", output)
+ }
+
+ output = GetAllMatches("4.0K", "")
+ if len(output) != 0 {
+ t.Error("File size matches", output)
+ }
+
+ output = GetAllMatches("72K", "")
+ if len(output) != 0 {
+ t.Error("File size matches", output)
+ }
+
+ output = GetAllMatches("remotes/origin/master", "")
+ if len(output) != 0 {
+ t.Error("Git branch matches", output)
+ }
+
+ output = GetAllMatches("I have a cat.", "")
+ if len(output) != 0 {
+ t.Error("Matches sentence", output)
+ }
+
+ output = GetAllMatches("0.0.0.0:3000", "")
+ if len(output) != 0 {
+ t.Error("Match ipadress", output)
+ }
+
+ output = GetAllMatches("'/usr/bin", "")
+ if output[0] != "/usr/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("/usr_b/bin", "")
+ if output[0] != "/usr_b/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("\"/usr/bin", "")
+ if output[0] != "/usr/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("`/usr/bin", "")
+ if output[0] != "/usr/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("€/usr/bin", "")
+ if output[0] != "/usr/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("prefix=/usr/bin", "")
+ if len(output) != 1 {
+ t.Error("Should match =/usr/bin", output)
+ }
+ if output[0] != "/usr/bin" {
+ t.Error("Doesn't match statement correctly", output)
+ }
+
+ output = GetAllMatches("/var//log", "")
+ if len(output) != 0 {
+ t.Error("Matches double //", output)
+ }
+
+ output = GetAllMatches("s/+//", "")
+ if len(output) != 0 {
+ t.Error("Doesn't match substitute", output)
+ }
+
+ output = GetAllMatches("s/^//", "")
+ if len(output) != 0 {
+ t.Error("Doesn't match substitute", output)
+ }
+
+ output = GetAllMatches("/usr/bin/env\\", "")
+ if len(output) != 1 {
+ t.Error("Doesn't match escaped", output)
+ }
+ if output[0] != "/usr/bin/env" {
+ t.Error("Doesn't match escaped exactly", output)
+ }
+
+ output = GetAllMatches("!#/usr/bin/env", "")
+ if len(output) != 1 {
+ t.Error("Doesn't match shebang", output)
+ }
+ if output[0] != "/usr/bin/env" {
+ t.Error("Doesn't match shebang exactly", output)
+ }
+
+ output = GetAllMatches("hello .gitignore", "")