]> Sergey Matveev's repositories - path-extractor.git/blobdiff - pe_test.go
Add fix for lines having more text with ackmate
[path-extractor.git] / pe_test.go
index 18297677e2aca6a578eacfcc967ae18fcc148add..c9726174fd46962e9859cbaf13deb1ce41ecf0f8 100644 (file)
@@ -198,4 +198,16 @@ func TestEverything(t *testing.T) {
        if output[0] != "test.js:45:12" {
                t.Errorf("Ackmate should output right line number", output)
        }
+
+       output = GetAllMatches("test.js:45:12 foo bar", "ackmate")
+       if len(output) != 1 {
+               t.Errorf("Ackmate doesnt match", output)
+       }
+
+       if output[0] == "test.js" {
+               t.Errorf("Ackmate should not forget number", output)
+       }
+       if output[0] != "test.js:45:12" {
+               t.Errorf("Ackmate should output right line number", output)
+       }
 }