aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-01-13 09:42:36 +0100
committerLars Ingebrigtsen2022-01-13 09:49:19 +0100
commitd30fde6b0ccc02eada1f43e0b4cc1873e42f14d2 (patch)
tree797cfda81ea51b405193b05b66dfa75981eb7acb /test
parentc8a2af3037c647bf6dd53f53af1b344e284f809b (diff)
downloademacs-d30fde6b0ccc02eada1f43e0b4cc1873e42f14d2.tar.gz
emacs-d30fde6b0ccc02eada1f43e0b4cc1873e42f14d2.zip
Avoid infloops in help-fns--analyze-function with aliases
* lisp/help-fns.el (help-fns--analyze-function): Use function-alias-p to avoid infloops.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/help-fns-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 6ee7b4f3eb1..4df8e3c9ef6 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -177,4 +177,13 @@ Return first line of the output of (describe-function-1 FUNC)."
177 (should-not (find-lisp-object-file-name help-fns--test-var 'defface)) 177 (should-not (find-lisp-object-file-name help-fns--test-var 'defface))
178 (should-not (find-lisp-object-file-name help-fns--test-var 1)))) 178 (should-not (find-lisp-object-file-name help-fns--test-var 1))))
179 179
180(ert-deftest help-fns--analyze-function-recursive ()
181 (defalias 'help-fns--a 'help-fns--b)
182 (should (equal (help-fns--analyze-function 'help-fns--a)
183 '(help-fns--a help-fns--b t help-fns--b)))
184 ;; Make a loop and see that it doesn't infloop.
185 (defalias 'help-fns--b 'help-fns--a)
186 (should (equal (help-fns--analyze-function 'help-fns--a)
187 '(help-fns--a help-fns--b t help-fns--b))))
188
180;;; help-fns-tests.el ends here 189;;; help-fns-tests.el ends here