1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 09:20:54 -08:00

Suggest alternative reason for ERT test duplication error

* lisp/emacs-lisp/ert.el (ert-set-test): Amend error message;
maybe the redefinition was caused by a file loaded twice.
(Bug#66782)

Suggested by Xiyue Deng.

(cherry picked from commit 425d23fbea)
This commit is contained in:
Mattias Engdegård 2023-11-03 18:06:04 +01:00 committed by Eli Zaretskii
parent 196def4fa6
commit 33fae4b02d

View file

@ -151,7 +151,7 @@ mode.")
(when (and noninteractive (get symbol 'ert--test))
;; Make sure duplicated tests are discovered since the older test would
;; be ignored silently otherwise.
(error "Test `%s' redefined" symbol))
(error "Test `%s' redefined (or loaded twice)" symbol))
(define-symbol-prop symbol 'ert--test definition)
definition)