From: F. Jason Park Date: Wed, 16 Nov 2022 09:21:20 +0000 (-0800) Subject: ; Make some ERC test fixtures a bit more courteous X-Git-Tag: emacs-29.0.90~1616^2~134 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4351fb7161f9490f21281b0b0abfd5854dc2f2ea;p=emacs.git ; Make some ERC test fixtures a bit more courteous * test/lisp/erc/erc-dcc-tests.el (erc-dcc-tests--pcomplete-common): Only emit messages when interactive. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-tests-with-server): Shadow `erc-after-connect' so `erc-autojoin-channels' doesn't affect other tests. test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--make-bindings): Shadow `erc-after-connect' here as well. Also require erc instead of erc-backend to silence some new compiler warnings the cropped up after the creation of erc-common.el. --- diff --git a/test/lisp/erc/erc-dcc-tests.el b/test/lisp/erc/erc-dcc-tests.el index 8645d7f1044..74cbb7d9476 100644 --- a/test/lisp/erc/erc-dcc-tests.el +++ b/test/lisp/erc/erc-dcc-tests.el @@ -167,7 +167,8 @@ (defun erc-dcc-tests--pcomplete-common (test-fn) (with-current-buffer (get-buffer-create "*erc-dcc-do-GET-command*") - (let* ((proc (start-process "fake" (current-buffer) "sleep" "10")) + (let* ((inhibit-message noninteractive) + (proc (start-process "fake" (current-buffer) "sleep" "10")) (elt (list :nick "tester!~tester@fake.irc" :type 'GET :peer nil diff --git a/test/lisp/erc/resources/erc-d/erc-d-tests.el b/test/lisp/erc/resources/erc-d/erc-d-tests.el index a4befd96b5e..8dd5cef7aa2 100644 --- a/test/lisp/erc/resources/erc-d/erc-d-tests.el +++ b/test/lisp/erc/resources/erc-d/erc-d-tests.el @@ -562,6 +562,7 @@ DUMB-SERVER-VAR are bound accordingly in BODY." ;; (erc-server-flood-penalty 0.05) erc-autojoin-channels-alist + erc-after-connect erc-server-auto-reconnect) (should-not erc-d--slow-mo) (with-current-buffer "*erc-d-server*" (erc-d-t-search-for 4 "Starting")) diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el index bc2cb68cd86..ef65125241f 100644 --- a/test/lisp/erc/resources/erc-scenarios-common.el +++ b/test/lisp/erc/resources/erc-scenarios-common.el @@ -73,7 +73,7 @@ (require 'erc-d-t) (require 'erc-d))) -(require 'erc-backend) +(require 'erc) (eval-when-compile (require 'erc-join) (require 'erc-services)) @@ -125,6 +125,7 @@ (erc-auth-source-parameters-join-function nil) (erc-autojoin-channels-alist nil) (erc-server-auto-reconnect nil) + (erc-after-connect nil) (erc-d-linger-secs 10) ,@bindings)))