X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=pe_test.go;h=3f24886f209bf927c03132b674ad2ff36ec369c7;hb=4ce6b9e8e84f60bbf157c216c5bf32eb19177236;hp=7e52783ef9be9d5d92ebc37c3578884d7746081e;hpb=54f890f142995fbc2ed737b8fff1635a8226ccc3;p=path-extractor.git diff --git a/pe_test.go b/pe_test.go index 7e52783..3f24886 100644 --- a/pe_test.go +++ b/pe_test.go @@ -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) } }