]> Sergey Matveev's repositories - path-extractor.git/blobdiff - pe_test.go
Getting line number now works
[path-extractor.git] / pe_test.go
index 7e52783ef9be9d5d92ebc37c3578884d7746081e..3f24886f209bf927c03132b674ad2ff36ec369c7 100644 (file)
@@ -183,7 +183,19 @@ func TestEverything(t *testing.T) {
        if output[0] == "test.js" {
                t.Errorf("Ackmate should not forget number", output)
        }
-       if output[0] != "test.js:45:1" {
+       if output[0] != "test.js:45" {
+               t.Errorf("Ackmate should output right line number", output)
+       }
+
+       output = GetAllMatches("test.js:45:12", MatchOptions{format: "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)
        }
 }