emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 c267cd0151 1/3: ; Kill some stray buffers left behind by ERC te


From: F. Jason Park
Subject: emacs-29 c267cd0151 1/3: ; Kill some stray buffers left behind by ERC tests
Date: Tue, 10 Jan 2023 09:34:42 -0500 (EST)

branch: emacs-29
commit c267cd01517bca9570faf13c4454793e7fb0c97b
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>

    ; Kill some stray buffers left behind by ERC tests
    
    * test/lisp/erc/erc-services-tests.el
    (erc--auth-source-search--plstore-standard,
    erc--auth-source-search--plstore-announced,
    erc--auth-source-search--plstore-overrides): Kill buffer renamed by
    plstore.  In the future, try using the `:buffer' keyword introduced in
    Emacs 29.
    * test/lisp/erc/resources/erc-d/erc-d-t.el
    (erc-d-t-kill-related-buffers): Don't forget about `erc-dcc-chat-mode'
    buffers.
---
 test/lisp/erc/erc-services-tests.el      | 9 ++++++---
 test/lisp/erc/resources/erc-d/erc-d-t.el | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/test/lisp/erc/erc-services-tests.el 
b/test/lisp/erc/erc-services-tests.el
index b1d36d868e..9181a47ee3 100644
--- a/test/lisp/erc/erc-services-tests.el
+++ b/test/lisp/erc/erc-services-tests.el
@@ -248,7 +248,8 @@
     (let ((auth-sources (list plstore-file))
           (auth-source-do-cache nil))
       (erc-services-tests--auth-source-standard
-       #'erc-services-test--call-with-plstore))))
+       #'erc-services-test--call-with-plstore))
+    (kill-buffer (get-file-buffer plstore-file))))
 
 (ert-deftest erc--auth-source-search--plstore-announced ()
   (ert-with-temp-file plstore-file
@@ -264,7 +265,8 @@
     (let ((auth-sources (list plstore-file))
           (auth-source-do-cache nil))
       (erc-services-tests--auth-source-announced
-       #'erc-services-test--call-with-plstore))))
+       #'erc-services-test--call-with-plstore))
+    (kill-buffer (get-file-buffer plstore-file))))
 
 (ert-deftest erc--auth-source-search--plstore-overrides ()
   (ert-with-temp-file plstore-file
@@ -296,7 +298,8 @@
     (let ((auth-sources (list plstore-file))
           (auth-source-do-cache nil))
       (erc-services-tests--auth-source-overrides
-       #'erc-services-test--call-with-plstore))))
+       #'erc-services-test--call-with-plstore))
+    (kill-buffer (get-file-buffer plstore-file))))
 
 ;; auth-source JSON backend
 
diff --git a/test/lisp/erc/resources/erc-d/erc-d-t.el 
b/test/lisp/erc/resources/erc-d/erc-d-t.el
index 282c193b70..7b2adf4f07 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-t.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-t.el
@@ -32,7 +32,7 @@
     (dolist (buf (buffer-list))
       (with-current-buffer buf
         (when (or erc-d-u--process-buffer
-                  (derived-mode-p 'erc-mode))
+                  (derived-mode-p 'erc-mode 'erc-dcc-chat-mode))
           (push buf buflist))))
     (dolist (buf buflist)
       (when (and (boundp 'erc-server-flood-timer)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]