diff options
| author | Eli Zaretskii | 2016-12-12 19:56:03 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-12-12 19:56:03 +0200 |
| commit | 940df47741c5e7be1c1c84d7371da492018f0d8a (patch) | |
| tree | 8cbdfe258336fd878fb2eaba8547880e5a705b64 | |
| parent | 825f4dd42f0f656bcb4536546b33fe8e54756468 (diff) | |
| download | emacs-940df47741c5e7be1c1c84d7371da492018f0d8a.tar.gz emacs-940df47741c5e7be1c1c84d7371da492018f0d8a.zip | |
Make etags-tests work in out-of-tree builds
* test/lisp/progmodes/etags-tests.el (etags-bug-158)
(etags-bug-23164): Make them work in an out-of-tree build.
Reported by Ken Brown <kbrown@cornell.edu>.
| -rw-r--r-- | test/lisp/progmodes/etags-tests.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/lisp/progmodes/etags-tests.el b/test/lisp/progmodes/etags-tests.el index a715bba32ab..a992a17dc46 100644 --- a/test/lisp/progmodes/etags-tests.el +++ b/test/lisp/progmodes/etags-tests.el | |||
| @@ -37,7 +37,9 @@ | |||
| 37 | xref-buf) | 37 | xref-buf) |
| 38 | (set-buffer buf-with-global-tags) | 38 | (set-buffer buf-with-global-tags) |
| 39 | (setq default-directory (expand-file-name ".")) | 39 | (setq default-directory (expand-file-name ".")) |
| 40 | (visit-tags-table "./manual/etags/ETAGS.good_1") | 40 | (visit-tags-table |
| 41 | (expand-file-name "manual/etags/ETAGS.good_1" | ||
| 42 | (getenv "EMACS_TEST_DIRECTORY"))) | ||
| 41 | ;; Check that tags in ETAGS.good_1 are recognized. | 43 | ;; Check that tags in ETAGS.good_1 are recognized. |
| 42 | (setq xref-buf (xref-find-definitions "LL_Task_Procedure_Access/t")) | 44 | (setq xref-buf (xref-find-definitions "LL_Task_Procedure_Access/t")) |
| 43 | (should (bufferp xref-buf)) | 45 | (should (bufferp xref-buf)) |
| @@ -52,7 +54,10 @@ | |||
| 52 | (set-buffer buf-with-local-tags) | 54 | (set-buffer buf-with-local-tags) |
| 53 | (setq default-directory (expand-file-name ".")) | 55 | (setq default-directory (expand-file-name ".")) |
| 54 | (let (his-masters-voice) | 56 | (let (his-masters-voice) |
| 55 | (visit-tags-table "./manual/etags/ETAGS.good_3" t)) | 57 | (visit-tags-table |
| 58 | (expand-file-name "manual/etags/ETAGS.good_3" | ||
| 59 | (getenv "EMACS_TEST_DIRECTORY")) | ||
| 60 | t)) | ||
| 56 | ;; Check that tags in ETAGS.good_1 are recognized. | 61 | ;; Check that tags in ETAGS.good_1 are recognized. |
| 57 | (setq xref-buf (xref-find-definitions "LL_Task_Procedure_Access/t")) | 62 | (setq xref-buf (xref-find-definitions "LL_Task_Procedure_Access/t")) |
| 58 | (should (bufferp xref-buf)) | 63 | (should (bufferp xref-buf)) |
| @@ -78,6 +83,9 @@ | |||
| 78 | "Test that setting a local value of tags table doesn't signal errors." | 83 | "Test that setting a local value of tags table doesn't signal errors." |
| 79 | (set-buffer (get-buffer-create "*foobar*")) | 84 | (set-buffer (get-buffer-create "*foobar*")) |
| 80 | (fundamental-mode) | 85 | (fundamental-mode) |
| 81 | (visit-tags-table "./manual/etags/ETAGS.good_3" t) | 86 | (visit-tags-table |
| 87 | (expand-file-name "manual/etags/ETAGS.good_3" | ||
| 88 | (getenv "EMACS_TEST_DIRECTORY")) | ||
| 89 | t) | ||
| 82 | (should (equal (should-error (xref-find-definitions "foobar123")) | 90 | (should (equal (should-error (xref-find-definitions "foobar123")) |
| 83 | '(user-error "No definitions found for: foobar123")))) | 91 | '(user-error "No definitions found for: foobar123")))) |