diff options
author | F. Jason Park <jp@neverwas.me> | 2022-12-12 23:58:03 -0800 |
---|---|---|
committer | F. Jason Park <jp@neverwas.me> | 2022-12-14 06:40:55 -0800 |
commit | f0c908887815a9cc668a5a03cbc1b7d6eaf8c91d (patch) | |
tree | 072e7685a125ea445b3e463da8c1c6a29610743b /test/lisp/erc/erc-networks-tests.el | |
parent | 09c0c6b2ba36c6b87e8e495710a580e909bbaf26 (diff) | |
download | emacs-f0c908887815a9cc668a5a03cbc1b7d6eaf8c91d.tar.gz emacs-f0c908887815a9cc668a5a03cbc1b7d6eaf8c91d.tar.bz2 emacs-f0c908887815a9cc668a5a03cbc1b7d6eaf8c91d.zip |
Set erc-network to a "given" ID instead of failing
* lisp/erc/erc-networks.el (erc-networks--determine): Return the
so-called "given" ID from a non-nil `:id' keyword arg passed to `erc'
or `erc-tls'.
(erc-networks--allow-unknown-network): Add internal variable to
allow IRC session to continue despite the network being unknown.
(erc-networks--set-name): Tell the user about falling back to a given
ID when the network can't be determined. When that's so, end the
session by destroying the connection unless
`erc-networks--allow-unknown-network' is enabled. (Bug#59976.)
(erc-networks--ensure-announced): Include the fallback announced
server name in the error message.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Add
dummy server process and don't expect an error to be signaled.
* test/lisp/erc/erc-scenarios-misc.el
(erc-scenarios-networks-announced-missing): Don't expect an error to
be signaled.
* test/lisp/erc/resources/networks/announced-missing/foonet.eld:
Remove "mode" match pattern.
Diffstat (limited to 'test/lisp/erc/erc-networks-tests.el')
-rw-r--r-- | test/lisp/erc/erc-networks-tests.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/lisp/erc/erc-networks-tests.el b/test/lisp/erc/erc-networks-tests.el index fc12bf7ce37..e883174e28a 100644 --- a/test/lisp/erc/erc-networks-tests.el +++ b/test/lisp/erc/erc-networks-tests.el @@ -1171,6 +1171,8 @@ (let (erc-server-announced-name (erc--isupport-params (make-hash-table)) erc-network + erc-quit-hook + (erc-server-process (erc-networks-tests--create-live-proc)) calls) (erc-mode) @@ -1183,10 +1185,7 @@ (ert-info ("Signals when table empty and NETWORK param unset") (setq erc-server-announced-name "irc.fake.gnu.org") - (let ((err (should-error (erc-networks--set-name - nil (make-erc-response))))) - (should (string-match-p "failed" (cadr err))) - (should (eq (car err) 'error))) + (should (eq 'error (erc-networks--set-name nil (make-erc-response)))) (should (string-match-p (rx "*** Failed") (car (pop calls))))))) (erc-networks-tests--clean-bufs))) |