}
func getCursorPosition(input string) string {
- r := regexp.MustCompile("^(:[0-9]+(:[0-9]+)?)$")
+ r := regexp.MustCompile("^(:[0-9]+(:[0-9]+)?)")
temp := [][]byte{}
temp = r.FindSubmatch([]byte(input))
if len(temp) <= 1 {
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)
+ }
}