diff options
| author | Dmitry Gutov | 2016-05-04 01:59:29 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-05-04 01:59:29 +0300 |
| commit | 4d8fd9cf338cf9b5dfc613657adfeabff2d9c14e (patch) | |
| tree | 6878332f280455e3a9a513246b1eccfcea04fc97 /test | |
| parent | f559b374a30f3615261f7a902fc3428cac6289f4 (diff) | |
| download | emacs-4d8fd9cf338cf9b5dfc613657adfeabff2d9c14e.tar.gz emacs-4d8fd9cf338cf9b5dfc613657adfeabff2d9c14e.zip | |
Handle "empty line" regexp in xref searches
* lisp/progmodes/xref.el (xref--collect-matches-1): Stop after one
match if re-search-forward doesn't move point (bug#23426).
* test/automated/xref-tests.el
(xref-collect-matches-finds-an-empty-line-regexp-match):
Uncomment test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/xref-tests.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/automated/xref-tests.el b/test/automated/xref-tests.el index 1b500c3c418..28ca3511c22 100644 --- a/test/automated/xref-tests.el +++ b/test/automated/xref-tests.el | |||
| @@ -28,10 +28,10 @@ | |||
| 28 | (should (equal 0 (xref-file-location-column (nth 0 locs)))) | 28 | (should (equal 0 (xref-file-location-column (nth 0 locs)))) |
| 29 | (should (equal 4 (xref-file-location-column (nth 1 locs)))))) | 29 | (should (equal 4 (xref-file-location-column (nth 1 locs)))))) |
| 30 | 30 | ||
| 31 | ;; (ert-deftest xref-collect-matches-finds-an-empty-line-regexp-match () | 31 | (ert-deftest xref-collect-matches-finds-an-empty-line-regexp-match () |
| 32 | ;; (let* ((matches (xref-collect-matches "^$" "*" xref-tests-data-dir nil)) | 32 | (let* ((matches (xref-collect-matches "^$" "*" xref-tests-data-dir nil)) |
| 33 | ;; (locs (mapcar #'xref-item-location matches))) | 33 | (locs (mapcar #'xref-item-location matches))) |
| 34 | ;; (should (= 1 (length matches))) | 34 | (should (= 1 (length matches))) |
| 35 | ;; (should (string-match-p "file2\\.txt\\'" (xref-location-group (nth 0 locs)))) | 35 | (should (string-match-p "file2\\.txt\\'" (xref-location-group (nth 0 locs)))) |
| 36 | ;; (should (equal 1 (xref-location-line (nth 0 locs)))) | 36 | (should (equal 1 (xref-location-line (nth 0 locs)))) |
| 37 | ;; (should (equal 0 (xref-file-location-column (nth 0 locs)))))) | 37 | (should (equal 0 (xref-file-location-column (nth 0 locs)))))) |