From de60992053a6ce21afe218e37bb377e7a5713522 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 15 Oct 2017 11:38:21 -0400 Subject: [PATCH] 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. --- lisp/emacs-lisp/ert.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 83acbacb883..3a3979e81f0 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1625,7 +1625,7 @@ default (if any)." (defun ert-find-test-other-window (test-name) "Find, in another window, the definition of TEST-NAME." (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) "Make the test TEST-NAME unbound. @@ -2594,7 +2594,7 @@ To be used in the ERT results buffer." ;;; 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 (:eval (ert--tests-running-mode-line-indicator)))) -- 2.39.2