]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix recently broken test (bug#77777).
authorEshel Yaron <me@eshelyaron.com>
Sun, 13 Apr 2025 11:53:29 +0000 (13:53 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 13 Apr 2025 21:01:10 +0000 (23:01 +0200)
* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--locate-macro-generated-symbols): bind
'trusted-content' to names of files in which we want to
expand macros during this test.

(cherry picked from commit ebaf4241263e167e992981efb8d1bf571f311803)

test/lisp/emacs-lisp/find-func-tests.el

index 884e698bc762062bd136a138f4800a47ceeb3cad..325430196b4e082b9f339181fec899fa281a5814 100644 (file)
@@ -103,10 +103,13 @@ expected function symbol and function library, respectively."
 (declare-function compilation--message->loc nil "compile")
 
 (ert-deftest find-func-tests--locate-macro-generated-symbols () ;bug#45443
-  (should (cdr (find-function-search-for-symbol
-                #'compilation--message->loc nil "compile")))
-  (should (cdr (find-function-search-for-symbol
-                'c-mode-hook 'defvar "cc-mode"))))
+  (let ((trusted-content
+         (list (abbreviate-file-name (find-library-name "compile"))
+               (abbreviate-file-name (find-library-name "cc-mode")))))
+    (should (cdr (find-function-search-for-symbol
+                  #'compilation--message->loc nil "compile")))
+    (should (cdr (find-function-search-for-symbol
+                  'c-mode-hook 'defvar "cc-mode")))))
 
 (provide 'find-func-tests)
 ;;; find-func-tests.el ends here