* 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
425d23fbeaede81ab4f50b4073949cc1c8a3fbd0)
(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)