Fix ert-test finding by symbol (Bug#28849)

In 2017-07-28 "* lisp/subr.el (define-symbol-prop): New function", the
symbol used for ert tests in load-history was changed from
`ert-deftest' to `ert--test', but a couple of other places were not
updated accordingly.
* lisp/emacs-lisp/ert.el (ert-find-test-other-window): Pass
`ert--test' as the TYPE to `find-function-do-it'.
(top-level): Use `ert--test' as the key to the
`find-function-regexp-alist' entry.
This commit is contained in:
Noam Postavsky 2017-10-15 11:38:21 -04:00
parent 51615a8082
commit de60992053

View file

@ -1625,7 +1625,7 @@ default (if any)."
(defun ert-find-test-other-window (test-name) (defun ert-find-test-other-window (test-name)
"Find, in another window, the definition of TEST-NAME." "Find, in another window, the definition of TEST-NAME."
(interactive (list (ert-read-test-name-at-point "Find test definition: "))) (interactive (list (ert-read-test-name-at-point "Find test definition: ")))
(find-function-do-it test-name 'ert-deftest 'switch-to-buffer-other-window)) (find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window))
(defun ert-delete-test (test-name) (defun ert-delete-test (test-name)
"Make the test TEST-NAME unbound. "Make the test TEST-NAME unbound.
@ -2594,7 +2594,7 @@ To be used in the ERT results buffer."
;;; Actions on load/unload. ;;; Actions on load/unload.
(add-to-list 'find-function-regexp-alist '(ert-deftest . ert--find-test-regexp)) (add-to-list 'find-function-regexp-alist '(ert--test . ert--find-test-regexp))
(add-to-list 'minor-mode-alist '(ert--current-run-stats (add-to-list 'minor-mode-alist '(ert--current-run-stats
(:eval (:eval
(ert--tests-running-mode-line-indicator)))) (ert--tests-running-mode-line-indicator))))