]> git.eshelyaron.com Git - emacs.git/commitdiff
; Kill some stray buffers left behind by ERC tests
authorF. Jason Park <jp@neverwas.me>
Wed, 4 Jan 2023 07:10:53 +0000 (23:10 -0800)
committerF. Jason Park <jp@neverwas.me>
Tue, 10 Jan 2023 14:34:01 +0000 (06:34 -0800)
* 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
test/lisp/erc/resources/erc-d/erc-d-t.el

index b1d36d868eb64b24099ecdcb9e0330024d472425..9181a47ee3bf470f1b316e455ebcabc3b4cd4611 100644 (file)
     (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
     (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
     (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
 
index 282c193b70729740184636f1f9c4282d45f8e67e..7b2adf4f07bc8c40c88cde8ea092ae6694a3e2c8 100644 (file)
@@ -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)