From: Mattias EngdegÄrd <mattiase@acm.org>
Date: Wed, 19 Aug 2020 11:39:18 +0000 (+0200)
Subject: Make bytecomp-tests re-runnable
X-Git-Tag: emacs-28.0.90~6510
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8fc4f7dcae84757b61a2189faad7659e875e42f;p=emacs.git

Make bytecomp-tests re-runnable

* test/lisp/emacs-lisp/bytecomp-tests.el
(test-byte-comp-macro-expand-lexical-override): Remove functions
before testing so that the test can be run twice without failing.
---

diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 894914300ae..27acdffa532 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -479,6 +479,8 @@ Subtests signal errors if something goes wrong."
 (ert-deftest bytecomp-tests--warnings ()
   (with-current-buffer (get-buffer-create "*Compile-Log*")
     (let ((inhibit-read-only t)) (erase-buffer)))
+  (dolist (f '(my-test0 my--test11 my--test12 my--test2))
+    (fset f nil))
   (test-byte-comp-compile-and-load t
     '(progn
        (defun my-test0 ()